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
ca4be3892ec0c1b5bc337a9fae10503b5f7f765a
bika/lims/browser/validation.py
bika/lims/browser/validation.py
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
Revert "Inline Validation fails silently if request is malformed"
Revert "Inline Validation fails silently if request is malformed" This reverts commit 723e4eb603568d3a60190d8d292cc335a74b79d5.
Python
agpl-3.0
labsanmartin/Bika-LIMS,veroc/Bika-LIMS,veroc/Bika-LIMS,rockfruit/bika.lims,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,anneline/Bika-LIMS,DeBortoliWines/Bika-LIMS,DeBortoliWines/Bika-LIMS,anneline/Bika-LIMS,DeBortoliWines/Bika-LIMS,anneline/Bika-LIMS,rockfruit/bika.lims,labsanmartin/Bika-LIMS
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
<commit_before>from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self...
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self, uid, fname, v...
<commit_before>from Products.Archetypes.browser.validation import InlineValidationView as _IVV from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName import json SKIP_VALIDATION_FIELDTYPES = ('image', 'file', 'datetime', 'reference') class InlineValidationView(_IVV): def __call__(self...
fb58117527c486401d07e046077151d3217e576f
python/copy-market-report.py
python/copy-market-report.py
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mark...
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%-d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mar...
Fix bug reading filenames for days with 1 number
Fix bug reading filenames for days with 1 number
Python
apache-2.0
cranburyattic/bf-app,cranburyattic/bf-app,cranburyattic/bf-app,cranburyattic/bf-app
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mark...
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%-d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mar...
<commit_before>import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + today...
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%-d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mar...
import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + todays_date + '/mark...
<commit_before>import yaml from time import gmtime, strftime from shutil import copy with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['default']['betfair']['data_dir'] todays_date = strftime('%Y-%-m-%d', gmtime()) src='/tmp/market-report.pdf' dest=data_dir + '/data/' + today...
6949339cda8c60b74341f854d9a00aa8abbfe4d5
test/level_sets_measure_test.py
test/level_sets_measure_test.py
__author__ = 'intsco' import cPickle from engine.pyIMS.image_measures.level_sets_measure import measure_of_chaos_dict from unittest import TestCase import unittest from os.path import join, realpath, dirname class MeasureOfChaosDictTest(TestCase): def setUp(self): self.rows, self.cols = 65, 65 s...
import unittest import numpy as np from ..image_measures.level_sets_measure import measure_of_chaos, _nan_to_zero class MeasureOfChaosTest(unittest.TestCase): def test__nan_to_zero_with_ge_zero(self): ids = ( np.zeros(1), np.ones(range(1, 10)), np.arange(1024 * 1024) ...
Implement first tests for _nan_to_zero
Implement first tests for _nan_to_zero - Remove outdated dict test class - write some test methods
Python
apache-2.0
andy-d-palmer/pyIMS,alexandrovteam/pyImagingMSpec
__author__ = 'intsco' import cPickle from engine.pyIMS.image_measures.level_sets_measure import measure_of_chaos_dict from unittest import TestCase import unittest from os.path import join, realpath, dirname class MeasureOfChaosDictTest(TestCase): def setUp(self): self.rows, self.cols = 65, 65 s...
import unittest import numpy as np from ..image_measures.level_sets_measure import measure_of_chaos, _nan_to_zero class MeasureOfChaosTest(unittest.TestCase): def test__nan_to_zero_with_ge_zero(self): ids = ( np.zeros(1), np.ones(range(1, 10)), np.arange(1024 * 1024) ...
<commit_before>__author__ = 'intsco' import cPickle from engine.pyIMS.image_measures.level_sets_measure import measure_of_chaos_dict from unittest import TestCase import unittest from os.path import join, realpath, dirname class MeasureOfChaosDictTest(TestCase): def setUp(self): self.rows, self.cols = 6...
import unittest import numpy as np from ..image_measures.level_sets_measure import measure_of_chaos, _nan_to_zero class MeasureOfChaosTest(unittest.TestCase): def test__nan_to_zero_with_ge_zero(self): ids = ( np.zeros(1), np.ones(range(1, 10)), np.arange(1024 * 1024) ...
__author__ = 'intsco' import cPickle from engine.pyIMS.image_measures.level_sets_measure import measure_of_chaos_dict from unittest import TestCase import unittest from os.path import join, realpath, dirname class MeasureOfChaosDictTest(TestCase): def setUp(self): self.rows, self.cols = 65, 65 s...
<commit_before>__author__ = 'intsco' import cPickle from engine.pyIMS.image_measures.level_sets_measure import measure_of_chaos_dict from unittest import TestCase import unittest from os.path import join, realpath, dirname class MeasureOfChaosDictTest(TestCase): def setUp(self): self.rows, self.cols = 6...
12f4b26d98c3ba765a11efeca3b646b5e9d0a0fb
running.py
running.py
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
Use TCX coordinates to fetch local weather
Use TCX coordinates to fetch local weather
Python
mit
briansuhr/slowburn
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
<commit_before>import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = pars...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
<commit_before>import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = pars...
5a7b13e26e94d03bc92600d9c24b3b2e8bc4321c
dstar_lib/aprsis.py
dstar_lib/aprsis.py
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
Fix an issue with the new aprslib
Fix an issue with the new aprslib
Python
mit
elielsardanons/dstar_sniffer,elielsardanons/dstar_sniffer
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
<commit_before>import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): ...
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): position = nm...
<commit_before>import aprslib import logging import nmea class AprsIS: logger = None def __init__(self, callsign, password): self.logger = logging.getLogger(__name__) self.aprs_connection = aprslib.IS(callsign, password) self.aprs_connection.connect() def send_beacon(self, callsign, sfx, message, gpgga): ...
132b148ca8701ee867b7a08432a3595a213ce470
cedexis/radar/tests/test_cli.py
cedexis/radar/tests/test_cli.py
import unittest import types import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType))
import unittest from unittest.mock import patch, MagicMock, call import types from pprint import pprint import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) @patch('logging.getLogger')...
Add unit test for overrides
Add unit test for overrides
Python
mit
cedexis/cedexis.radar
import unittest import types import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) Add unit test for overrides
import unittest from unittest.mock import patch, MagicMock, call import types from pprint import pprint import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) @patch('logging.getLogger')...
<commit_before>import unittest import types import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) <commit_msg>Add unit test for overrides<commit_after>
import unittest from unittest.mock import patch, MagicMock, call import types from pprint import pprint import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) @patch('logging.getLogger')...
import unittest import types import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) Add unit test for overridesimport unittest from unittest.mock import patch, MagicMock, call import types fr...
<commit_before>import unittest import types import cedexis.radar.cli class TestCommandLineInterface(unittest.TestCase): def test_main(self): self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType)) <commit_msg>Add unit test for overrides<commit_after>import unittest from unittest.mock impo...
70f167d3d5a7540fb3521b82ec70bf7c6db09a99
tests/test_contrib.py
tests/test_contrib.py
from __future__ import print_function import cooler.contrib.higlass as cch import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000kb.multires.cool') f = h5py.File(data_fil...
from __future__ import print_function import cooler.contrib.higlass as cch import cooler.contrib.recursive_agg_onefile as ra import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000...
Add test for recursive agg
Add test for recursive agg
Python
bsd-3-clause
mirnylab/cooler
from __future__ import print_function import cooler.contrib.higlass as cch import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000kb.multires.cool') f = h5py.File(data_fil...
from __future__ import print_function import cooler.contrib.higlass as cch import cooler.contrib.recursive_agg_onefile as ra import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000...
<commit_before>from __future__ import print_function import cooler.contrib.higlass as cch import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000kb.multires.cool') f = h5p...
from __future__ import print_function import cooler.contrib.higlass as cch import cooler.contrib.recursive_agg_onefile as ra import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000...
from __future__ import print_function import cooler.contrib.higlass as cch import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000kb.multires.cool') f = h5py.File(data_fil...
<commit_before>from __future__ import print_function import cooler.contrib.higlass as cch import h5py import os.path as op testdir = op.realpath(op.dirname(__file__)) def test_data_retrieval(): data_file = op.join(testdir, 'data', 'dixon2012-h1hesc-hindiii-allreps-filtered.1000kb.multires.cool') f = h5p...
27a0165d45f52114ebb65d59cf8e4f84f3232881
tests/test_lattice.py
tests/test_lattice.py
import rml.lattice def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0
import rml.lattice import rml.element def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 def test_lattice_with_one_element(): l = rml.lattice.Lattice() element_length = 1.5 e = rml.eleme...
Test simple lattice with one element.
Test simple lattice with one element.
Python
apache-2.0
willrogers/pml,willrogers/pml,razvanvasile/RML
import rml.lattice def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 Test simple lattice with one element.
import rml.lattice import rml.element def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 def test_lattice_with_one_element(): l = rml.lattice.Lattice() element_length = 1.5 e = rml.eleme...
<commit_before>import rml.lattice def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 <commit_msg>Test simple lattice with one element.<commit_after>
import rml.lattice import rml.element def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 def test_lattice_with_one_element(): l = rml.lattice.Lattice() element_length = 1.5 e = rml.eleme...
import rml.lattice def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 Test simple lattice with one element.import rml.lattice import rml.element def test_create_lattice(): l = rml.lattice.Lattice(...
<commit_before>import rml.lattice def test_create_lattice(): l = rml.lattice.Lattice() assert(len(l)) == 0 def test_non_negative_lattice(): l = rml.lattice.Lattice() assert(len(l)) >= 0 <commit_msg>Test simple lattice with one element.<commit_after>import rml.lattice import rml.element def test_creat...
7591189527ad05be62a561afadf70b217d725b1f
scrapi/processing/osf/__init__.py
scrapi/processing/osf/__init__.py
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
Make sure to keep certain report fields out of resources
Make sure to keep certain report fields out of resources
Python
apache-2.0
alexgarciac/scrapi,erinspace/scrapi,icereval/scrapi,mehanig/scrapi,felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,ostwald/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,jeffreyliu3230/scrapi
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
<commit_before>from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_e...
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_event(normalized...
<commit_before>from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.create_e...
3fe86c259e6015ca535510bd692cc26d5d4e64cc
bin/license_finder_pip.py
bin/license_finder_pip.py
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement(str(req.req)) for req in parse_requirements('requirements.txt', session=PipSes...
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement.parse(str(req.req)) for req in parse_requirements('requirements.txt', session=...
Use parse() method to instantiate Requirement
Use parse() method to instantiate Requirement [Fix #224] Signed-off-by: Tony Wong <[email protected]>
Python
mit
bspeck/LicenseFinder,sschuberth/LicenseFinder,bdshroyer/LicenseFinder,bdshroyer/LicenseFinder,bspeck/LicenseFinder,bdshroyer/LicenseFinder,tinfoil/LicenseFinder,tinfoil/LicenseFinder,bspeck/LicenseFinder,pivotal/LicenseFinder,bdshroyer/LicenseFinder,bspeck/LicenseFinder,sschuberth/LicenseFinder,bspeck/LicenseFinder,piv...
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement(str(req.req)) for req in parse_requirements('requirements.txt', session=PipSes...
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement.parse(str(req.req)) for req in parse_requirements('requirements.txt', session=...
<commit_before>#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement(str(req.req)) for req in parse_requirements('requirements.txt',...
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement.parse(str(req.req)) for req in parse_requirements('requirements.txt', session=...
#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement(str(req.req)) for req in parse_requirements('requirements.txt', session=PipSes...
<commit_before>#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [pkg_resources.Requirement(str(req.req)) for req in parse_requirements('requirements.txt',...
166e0980fc20b507763395297e8a67c7dcb3a3da
examples/neural_network_inference/onnx_converter/small_example.py
examples/neural_network_inference/onnx_converter/small_example.py
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
Update the example with latest interface
Update the example with latest interface Update the example with the latest interface of the function "convert"
Python
bsd-3-clause
apple/coremltools,apple/coremltools,apple/coremltools,apple/coremltools
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
<commit_before>import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10)...
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10) def forwa...
<commit_before>import torch import torch.nn as nn import torch.nn.functional as F from onnx_coreml import convert # Step 0 - (a) Define ML Model class small_model(nn.Module): def __init__(self): super(small_model, self).__init__() self.fc1 = nn.Linear(768, 256) self.fc2 = nn.Linear(256, 10)...
967ea6b083437cbe6c87b173567981e1ae41fefc
project/wsgi/tomodev.py
project/wsgi/tomodev.py
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
Set Python path inside WSGI application
Set Python path inside WSGI application
Python
agpl-3.0
ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
<commit_before>""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICA...
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting....
<commit_before>""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICA...
2198ae847cb257d210c043bb08d52206df749a24
Jeeves/jeeves.py
Jeeves/jeeves.py
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
Change knugen command to use array in config/data.json instead of hardcoded array.
Change knugen command to use array in config/data.json instead of hardcoded array.
Python
mit
havokoc/MyManJeeves
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
<commit_before>import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%...
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%s)' % (client.u...
<commit_before>import discord import asyncio import random import configparser import json def RunBot(config_file): config = configparser.ConfigParser() config.read(config_file) client = discord.Client() @client.event async def on_ready(): print('------') print('Logged in as %s (%...
b26200860337d4dba13aeafe7cfb9dff8bf181d0
salt/grains/nxos.py
salt/grains/nxos.py
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: Carbon For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Salt L...
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: 2016.11.0 For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Sal...
Update Carbon versionadded tags to 2016.11.0 in grains/*
Update Carbon versionadded tags to 2016.11.0 in grains/*
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: Carbon For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Salt L...
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: 2016.11.0 For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Sal...
<commit_before># -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: Carbon For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import ...
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: 2016.11.0 For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Sal...
# -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: Carbon For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import # Import Salt L...
<commit_before># -*- coding: utf-8 -*- ''' Grains for Cisco NX OS Switches Proxy minions .. versionadded: Carbon For documentation on setting up the nxos proxy minion look in the documentation for :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.nxos>`. ''' # Import Python Libs from __future__ import absolute_import ...
74728ef66fd13bfd7ad01f930114c2375e752d13
examples/skel.py
examples/skel.py
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
Remove some accidentally committed code.
Remove some accidentally committed code.
Python
lgpl-2.1
platipy/spyral
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
<commit_before>try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distin...
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distinct. A ...
<commit_before>try: import _path except NameError: pass import pygame import spyral import sys SIZE = (640, 480) BG_COLOR = (0, 0, 0) class Game(spyral.Scene): """ A Scene represents a distinct state of your game. They could be menus, different subgames, or any other things which are mostly distin...
b881247b182a45774ed494146904dcf2b1826d5e
sla_bot.py
sla_bot.py
import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): await client.send_message(me...
import asyncio import discord from discord.ext import commands bot = commands.Bot(command_prefix='!', description='test') @bot.event async def on_ready(): print('Logged in as') print(bot.user.name) print(bot.user.id) print('------') @bot.command() async def test(): await bot.say('Hello W...
Switch to Bot object instead of Client
Switch to Bot object instead of Client Better reflects examples in discord.py project
Python
mit
EsqWiggles/SLA-bot,EsqWiggles/SLA-bot
import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): await client.send_message(me...
import asyncio import discord from discord.ext import commands bot = commands.Bot(command_prefix='!', description='test') @bot.event async def on_ready(): print('Logged in as') print(bot.user.name) print(bot.user.id) print('------') @bot.command() async def test(): await bot.say('Hello W...
<commit_before>import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): await client....
import asyncio import discord from discord.ext import commands bot = commands.Bot(command_prefix='!', description='test') @bot.event async def on_ready(): print('Logged in as') print(bot.user.name) print(bot.user.id) print('------') @bot.command() async def test(): await bot.say('Hello W...
import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): await client.send_message(me...
<commit_before>import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): await client....
0ce553f791ba0aac599cc0ae5c4784fece9cb3da
bugsnag/django/middleware.py
bugsnag/django/middleware.py
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django def is_development_server(request): server = request.META.get('wsgi.file_wrapper', None) if server is None: return False return server.__module__ == 'django.core.servers.basehttp' class Bugsnag...
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django class BugsnagMiddleware(object): def __init__(self): bugsnag.django.configure() # pylint: disable-msg=R0201 def process_request(self, request): bugsnag.configure_request(django_request=re...
Remove obsolete check for development
Remove obsolete check for development
Python
mit
bugsnag/bugsnag-python,bugsnag/bugsnag-python,overplumbum/bugsnag-python,overplumbum/bugsnag-python
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django def is_development_server(request): server = request.META.get('wsgi.file_wrapper', None) if server is None: return False return server.__module__ == 'django.core.servers.basehttp' class Bugsnag...
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django class BugsnagMiddleware(object): def __init__(self): bugsnag.django.configure() # pylint: disable-msg=R0201 def process_request(self, request): bugsnag.configure_request(django_request=re...
<commit_before>from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django def is_development_server(request): server = request.META.get('wsgi.file_wrapper', None) if server is None: return False return server.__module__ == 'django.core.servers.basehttp'...
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django class BugsnagMiddleware(object): def __init__(self): bugsnag.django.configure() # pylint: disable-msg=R0201 def process_request(self, request): bugsnag.configure_request(django_request=re...
from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django def is_development_server(request): server = request.META.get('wsgi.file_wrapper', None) if server is None: return False return server.__module__ == 'django.core.servers.basehttp' class Bugsnag...
<commit_before>from __future__ import division, print_function, absolute_import import bugsnag import bugsnag.django def is_development_server(request): server = request.META.get('wsgi.file_wrapper', None) if server is None: return False return server.__module__ == 'django.core.servers.basehttp'...
e4d746ba6c5b842529c9dafb31a90bdd31fee687
performanceplatform/__init__.py
performanceplatform/__init__.py
# Namespace package: https://docs.python.org/2/library/pkgutil.html try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__)
Fix namespacing for PyPi installs
Fix namespacing for PyPi installs See https://github.com/alphagov/performanceplatform-client/pull/5
Python
mit
alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector
# Namespace package: https://docs.python.org/2/library/pkgutil.html try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) Fix namespacing for PyPi installs See https://github.com/alphagov/perfor...
__import__('pkg_resources').declare_namespace(__name__)
<commit_before># Namespace package: https://docs.python.org/2/library/pkgutil.html try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) <commit_msg>Fix namespacing for PyPi installs See https:/...
__import__('pkg_resources').declare_namespace(__name__)
# Namespace package: https://docs.python.org/2/library/pkgutil.html try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) Fix namespacing for PyPi installs See https://github.com/alphagov/perfor...
<commit_before># Namespace package: https://docs.python.org/2/library/pkgutil.html try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) <commit_msg>Fix namespacing for PyPi installs See https:/...
4b340e0712956ea44eace7382dd743890958a0fd
widgets/card.py
widgets/card.py
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, detailed=False, small=False): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_templa...
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, **kwargs): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_template('widgets/card.ht...
Revert "Fix a bug in caching"
Revert "Fix a bug in caching" This reverts commit 2565df456ecb290f620ce4dadca19c76b0eeb1af. Conflicts: widgets/card.py
Python
apache-2.0
teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, detailed=False, small=False): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_templa...
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, **kwargs): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_template('widgets/card.ht...
<commit_before># -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, detailed=False, small=False): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() retur...
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, **kwargs): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_template('widgets/card.ht...
# -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, detailed=False, small=False): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() return render_templa...
<commit_before># -*- coding: utf-8 -*- from flask import render_template from models.person import Person def card(person_or_id, detailed=False, small=False): if isinstance(person_or_id, Person): person = person_or_id else: person = Person.query.filter_by(id=person_or_id).first() retur...
fa75cdb0114d86b626a77ea19897abd532fd4aeb
src/hack4lt/forms.py
src/hack4lt/forms.py
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): class Meta: model = Hacker fields = ('username', 'first_name', 'last_name', 'email', 'reposito...
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from django.forms.util import ErrorList from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): password = forms.CharField(label=_('Password'), max_length=128, min_len...
Add password and password_repeat fields to registration form.
Add password and password_repeat fields to registration form.
Python
bsd-3-clause
niekas/Hack4LT
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): class Meta: model = Hacker fields = ('username', 'first_name', 'last_name', 'email', 'reposito...
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from django.forms.util import ErrorList from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): password = forms.CharField(label=_('Password'), max_length=128, min_len...
<commit_before>from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): class Meta: model = Hacker fields = ('username', 'first_name', 'last_name', 'em...
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from django.forms.util import ErrorList from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): password = forms.CharField(label=_('Password'), max_length=128, min_len...
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): class Meta: model = Hacker fields = ('username', 'first_name', 'last_name', 'email', 'reposito...
<commit_before>from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from hack4lt.models import Hacker class RegistrationForm(forms.ModelForm): class Meta: model = Hacker fields = ('username', 'first_name', 'last_name', 'em...
640aff6378b6f47d68645822fc5c2bb3fd737710
salt/modules/test_virtual.py
salt/modules/test_virtual.py
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def test(): return True
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def ping(): return True
Fix mis-naming from pylint cleanup
Fix mis-naming from pylint cleanup
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def test(): return True Fix mis-naming from pylint cleanup
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def ping(): return True
<commit_before># -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def test(): return True <commit_msg>Fix mis-naming from pylint cleanup<commit_after>
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def ping(): return True
# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def test(): return True Fix mis-naming from pylint cleanup# -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ fu...
<commit_before># -*- coding: utf-8 -*- ''' Module for running arbitrary tests with a __virtual__ function ''' from __future__ import absolute_import def __virtual__(): return False def test(): return True <commit_msg>Fix mis-naming from pylint cleanup<commit_after># -*- coding: utf-8 -*- ''' Module for runn...
467e8e4d8113a8f6473d7f82d86d5401053362b8
scripts/gen-release-notes.py
scripts/gen-release-notes.py
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
Remove release title from the GitHub release notes body
Remove release title from the GitHub release notes body
Python
mit
pytest-dev/pytest-mock
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
<commit_before>""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypand...
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypandoc this_dir = ...
<commit_before>""" Generates the release notes for the latest release, in Markdown. Convert CHANGELOG.rst to Markdown, and extracts just the latest release. Writes to ``scripts/latest-release-notes.md``, which can be used with https://github.com/softprops/action-gh-release. """ from pathlib import Path import pypand...
ac33c7fcee74053dae6edfdd4596bfe03098711d
waptpkg.py
waptpkg.py
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
Include locale in package hash
Include locale in package hash
Python
mit
jf-guillou/wapt-scripts
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
<commit_before># -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: ret...
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
# -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: return False ...
<commit_before># -*- coding: utf-8 -*- import os import waptpackage from waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey def download(remote, path, pkg): """Downloads package""" if not pkg.package: return False res = remote.download_packages(pkg, path) if res['errors']: ret...
13ba6bf5c12c46aa43c0060d40458fe453df9c33
ydf/yaml_ext.py
ydf/yaml_ext.py
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedLoader(yaml.Loader): """ Extends the default YAML loader to use :class:`~collections.OrderedDict` for mapping types....
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML loader to use :class:`~collections.Ordere...
Switch to round trip loader to support multiple documents.
Switch to round trip loader to support multiple documents.
Python
apache-2.0
ahawker/ydf
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedLoader(yaml.Loader): """ Extends the default YAML loader to use :class:`~collections.OrderedDict` for mapping types....
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML loader to use :class:`~collections.Ordere...
<commit_before>""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedLoader(yaml.Loader): """ Extends the default YAML loader to use :class:`~collections.OrderedDict` for map...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML loader to use :class:`~collections.Ordere...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedLoader(yaml.Loader): """ Extends the default YAML loader to use :class:`~collections.OrderedDict` for mapping types....
<commit_before>""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver class OrderedLoader(yaml.Loader): """ Extends the default YAML loader to use :class:`~collections.OrderedDict` for map...
9b586b953bfe3c94adb40d0a804de3d46fca1887
httpie/config.py
httpie/config.py
import os __author__ = 'jakub' CONFIG_DIR = os.path.expanduser('~/.httpie')
import os from requests.compat import is_windows __author__ = 'jakub' CONFIG_DIR = (os.path.expanduser('~/.httpie') if not is_windows else os.path.expandvars(r'%APPDATA%\\httpie'))
Use %APPDATA% for data on Windows.
Use %APPDATA% for data on Windows.
Python
bsd-3-clause
codingjoe/httpie,konopski/httpie,Bogon/httpie,fontenele/httpie,aredo/httpie,GrimDerp/httpie,vietlq/httpie,paran0ids0ul/httpie,gnagel/httpie,fontenele/httpie,lingtalfi/httpie,rschmidtz/httpie,alexeikabak/httpie,konopski/httpie,PKRoma/httpie,GrimDerp/httpie,PKRoma/httpie,bright-sparks/httpie,marklap/httpie,fritaly/httpie...
import os __author__ = 'jakub' CONFIG_DIR = os.path.expanduser('~/.httpie') Use %APPDATA% for data on Windows.
import os from requests.compat import is_windows __author__ = 'jakub' CONFIG_DIR = (os.path.expanduser('~/.httpie') if not is_windows else os.path.expandvars(r'%APPDATA%\\httpie'))
<commit_before>import os __author__ = 'jakub' CONFIG_DIR = os.path.expanduser('~/.httpie') <commit_msg>Use %APPDATA% for data on Windows.<commit_after>
import os from requests.compat import is_windows __author__ = 'jakub' CONFIG_DIR = (os.path.expanduser('~/.httpie') if not is_windows else os.path.expandvars(r'%APPDATA%\\httpie'))
import os __author__ = 'jakub' CONFIG_DIR = os.path.expanduser('~/.httpie') Use %APPDATA% for data on Windows.import os from requests.compat import is_windows __author__ = 'jakub' CONFIG_DIR = (os.path.expanduser('~/.httpie') if not is_windows else os.path.expandvars(r'%APPDATA%\\httpie'))
<commit_before>import os __author__ = 'jakub' CONFIG_DIR = os.path.expanduser('~/.httpie') <commit_msg>Use %APPDATA% for data on Windows.<commit_after>import os from requests.compat import is_windows __author__ = 'jakub' CONFIG_DIR = (os.path.expanduser('~/.httpie') if not is_windows else os.path.e...
085edf28b2e70552789407e16ca83faf78313672
version.py
version.py
major = 0 minor=0 patch=0 branch="dev" timestamp=1376579871.17
major = 0 minor=0 patch=25 branch="master" timestamp=1376610207.69
Tag commit for v0.0.25-master generated by gitmake.py
Tag commit for v0.0.25-master generated by gitmake.py
Python
mit
ryansturmer/gitmake
major = 0 minor=0 patch=0 branch="dev" timestamp=1376579871.17Tag commit for v0.0.25-master generated by gitmake.py
major = 0 minor=0 patch=25 branch="master" timestamp=1376610207.69
<commit_before>major = 0 minor=0 patch=0 branch="dev" timestamp=1376579871.17<commit_msg>Tag commit for v0.0.25-master generated by gitmake.py<commit_after>
major = 0 minor=0 patch=25 branch="master" timestamp=1376610207.69
major = 0 minor=0 patch=0 branch="dev" timestamp=1376579871.17Tag commit for v0.0.25-master generated by gitmake.pymajor = 0 minor=0 patch=25 branch="master" timestamp=1376610207.69
<commit_before>major = 0 minor=0 patch=0 branch="dev" timestamp=1376579871.17<commit_msg>Tag commit for v0.0.25-master generated by gitmake.py<commit_after>major = 0 minor=0 patch=25 branch="master" timestamp=1376610207.69
09d85cf39fd8196b26b357ee3f0b9fbb67770014
flask_jq.py
flask_jq.py
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
Add app run on main
Add app run on main
Python
mit
avidas/flask-jquery,avidas/flask-jquery,avidas/flask-jquery
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
<commit_before>from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) ...
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) @app.route('/')...
<commit_before>from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/_add_numbers') def add_numbers(): ''' Because numbers must be added server side ''' a = request.args.get('a', 0, type=int) b = request.args.get('b', 0, type=int) return jsonify(result=a + b) ...
c5ba874987b2e788ae905a1a84e7f2575ff9f991
conman/redirects/models.py
conman/redirects/models.py
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
Remove explicit default from BooleanField
Remove explicit default from BooleanField
Python
bsd-2-clause
Ian-Foote/django-conman,meshy/django-conman,meshy/django-conman
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
<commit_before>from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target...
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target`. This mo...
<commit_before>from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from conman.routes.models import Route from . import views class RouteRedirect(Route): """ When `route` is browsed to, browser should be redirected to `target...
f5d56b0c54af414f02721a1a02a0eaf80dbba898
client/python/unrealcv/util.py
client/python/unrealcv/util.py
import numpy as np import PIL from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): import PIL.Image img = PIL.Image.open(BytesIO(res)) return np.asarray(img) def read_npy(res): # res is a binary buffer return np.load(BytesIO(res))
import numpy as np import PIL.Image from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): img = None try: PIL_img = PIL.Image.open(BytesIO(res)) img = np.asarray(PIL_img) except: print('Read png can not parse response %s' % str(res[:20])) ...
Handle exceptions in read_png and read_npy.
Handle exceptions in read_png and read_npy.
Python
mit
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
import numpy as np import PIL from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): import PIL.Image img = PIL.Image.open(BytesIO(res)) return np.asarray(img) def read_npy(res): # res is a binary buffer return np.load(BytesIO(res)) Handle exceptions in re...
import numpy as np import PIL.Image from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): img = None try: PIL_img = PIL.Image.open(BytesIO(res)) img = np.asarray(PIL_img) except: print('Read png can not parse response %s' % str(res[:20])) ...
<commit_before>import numpy as np import PIL from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): import PIL.Image img = PIL.Image.open(BytesIO(res)) return np.asarray(img) def read_npy(res): # res is a binary buffer return np.load(BytesIO(res)) <commit_...
import numpy as np import PIL.Image from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): img = None try: PIL_img = PIL.Image.open(BytesIO(res)) img = np.asarray(PIL_img) except: print('Read png can not parse response %s' % str(res[:20])) ...
import numpy as np import PIL from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): import PIL.Image img = PIL.Image.open(BytesIO(res)) return np.asarray(img) def read_npy(res): # res is a binary buffer return np.load(BytesIO(res)) Handle exceptions in re...
<commit_before>import numpy as np import PIL from io import BytesIO # StringIO module is removed in python3, use io module def read_png(res): import PIL.Image img = PIL.Image.open(BytesIO(res)) return np.asarray(img) def read_npy(res): # res is a binary buffer return np.load(BytesIO(res)) <commit_...
95f0ae5e04df6e5ce454b15551133caacfd44536
services/netflix.py
services/netflix.py
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = '...
Fix token retrieval for Netflix
Fix token retrieval for Netflix
Python
bsd-3-clause
foauth/foauth.org,foauth/oauth-proxy,foauth/foauth.org,foauth/foauth.org
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = '...
<commit_before>import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token...
import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = '...
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
<commit_before>import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token...
3093941ebed1f9c726a88776819ee181cdb0b869
piper/db/core.py
piper/db/core.py
import logbook # Let's name this DatabaseBase. 'tis a silly name. class DatabaseBase(object): """ Abstract class representing a persistance layer """ def __init__(self): self.log = logbook.Logger(self.__class__.__name__) def init(self, ns, config): raise NotImplementedError() ...
import logbook class LazyDatabaseMixin(object): """ A mixin class that gives the subclass lazy access to the database layer The lazy attribute self.db is added, and the database class is gotten from self.config, and an instance is made and returned. """ _db = None @property def db(...
Add first iteration of LazyDatabaseMixin()
Add first iteration of LazyDatabaseMixin()
Python
mit
thiderman/piper
import logbook # Let's name this DatabaseBase. 'tis a silly name. class DatabaseBase(object): """ Abstract class representing a persistance layer """ def __init__(self): self.log = logbook.Logger(self.__class__.__name__) def init(self, ns, config): raise NotImplementedError() ...
import logbook class LazyDatabaseMixin(object): """ A mixin class that gives the subclass lazy access to the database layer The lazy attribute self.db is added, and the database class is gotten from self.config, and an instance is made and returned. """ _db = None @property def db(...
<commit_before>import logbook # Let's name this DatabaseBase. 'tis a silly name. class DatabaseBase(object): """ Abstract class representing a persistance layer """ def __init__(self): self.log = logbook.Logger(self.__class__.__name__) def init(self, ns, config): raise NotImplem...
import logbook class LazyDatabaseMixin(object): """ A mixin class that gives the subclass lazy access to the database layer The lazy attribute self.db is added, and the database class is gotten from self.config, and an instance is made and returned. """ _db = None @property def db(...
import logbook # Let's name this DatabaseBase. 'tis a silly name. class DatabaseBase(object): """ Abstract class representing a persistance layer """ def __init__(self): self.log = logbook.Logger(self.__class__.__name__) def init(self, ns, config): raise NotImplementedError() ...
<commit_before>import logbook # Let's name this DatabaseBase. 'tis a silly name. class DatabaseBase(object): """ Abstract class representing a persistance layer """ def __init__(self): self.log = logbook.Logger(self.__class__.__name__) def init(self, ns, config): raise NotImplem...
4de82c9a0737c079634a87d0ea358fba7840a419
sesame/test_settings.py
sesame/test_settings.py
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
Use a fast password hasher for tests.
Use a fast password hasher for tests. Speed is obviously more important than security in tests.
Python
bsd-3-clause
aaugustin/django-sesame,aaugustin/django-sesame
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
<commit_before>from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}...
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} INSTALLED_AP...
<commit_before>from __future__ import unicode_literals AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", "sesame.backends.ModelBackend", ] CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"}} DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}...
cdae77dee9888d6d6094566747650bf80d631f03
station.py
station.py
"""Creates the station class""" #import ask_user from ask_user #import int_check from int_check #import reasonable_check from reasonable_check class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations total_station_pop: calculates total...
"""Creates the station class""" #import request_integer_in_range from request_integer_in_range class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations request_integer_in_range : requests an integer in a range """ def __...
Integrate integer test function into instantiation
Integrate integer test function into instantiation Ref #23
Python
mit
ForestPride/rail-problem
"""Creates the station class""" #import ask_user from ask_user #import int_check from int_check #import reasonable_check from reasonable_check class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations total_station_pop: calculates total...
"""Creates the station class""" #import request_integer_in_range from request_integer_in_range class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations request_integer_in_range : requests an integer in a range """ def __...
<commit_before>"""Creates the station class""" #import ask_user from ask_user #import int_check from int_check #import reasonable_check from reasonable_check class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations total_station_pop: c...
"""Creates the station class""" #import request_integer_in_range from request_integer_in_range class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations request_integer_in_range : requests an integer in a range """ def __...
"""Creates the station class""" #import ask_user from ask_user #import int_check from int_check #import reasonable_check from reasonable_check class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations total_station_pop: calculates total...
<commit_before>"""Creates the station class""" #import ask_user from ask_user #import int_check from int_check #import reasonable_check from reasonable_check class Station: """ Each train station is an instance of the Station class. Methods: __init__: creates a new stations total_station_pop: c...
9ea05a80114237a87af73e91cb929686235baa3e
lib/rpnpy/__init__.py
lib/rpnpy/__init__.py
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
Add missing rpnpy.range reference for Python 3.
Add missing rpnpy.range reference for Python 3. Signed-off-by: Stephane_Chamberland <[email protected]>
Python
lgpl-2.1
meteokid/python-rpn,meteokid/python-rpn,meteokid/python-rpn,meteokid/python-rpn
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
<commit_before>import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambd...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
<commit_before>import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambd...
fff0b4af89e02ff834221ef056b7dcb979dc6cd7
webpay/webpay.py
webpay/webpay.py
from .api import Account, Charges, Customers import requests class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers(self) ...
from .api import Account, Charges, Customers import requests import json class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers...
Use JSON for other than GET request
Use JSON for other than GET request Because internal dict parameters is not handled as expected. >>> payload = {'key1': 'value1', 'key2': 'value2', 'set': {'a': 'x', 'b': 'y'}} >>> r = requests.post("http://httpbin.org/post", data=payload) >>> r.json() {... 'form': {'key2': 'value2', 'key1': '...
Python
mit
yamaneko1212/webpay-python
from .api import Account, Charges, Customers import requests class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers(self) ...
from .api import Account, Charges, Customers import requests import json class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers...
<commit_before>from .api import Account, Charges, Customers import requests class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Custom...
from .api import Account, Charges, Customers import requests import json class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers...
from .api import Account, Charges, Customers import requests class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Customers(self) ...
<commit_before>from .api import Account, Charges, Customers import requests class WebPay: def __init__(self, key, api_base = 'https://api.webpay.jp/v1'): self.key = key self.api_base = api_base self.account = Account(self) self.charges = Charges(self) self.customers = Custom...
b67617abe1e8530523da7231a9d74283935a1bb7
htext/ja/utils.py
htext/ja/utils.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
Fix UnicodeDecodeError on the environments where the default encoding is ascii
Fix UnicodeDecodeError on the environments where the default encoding is ascii
Python
mit
hunza/htext
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.strin...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.string_types): ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import re import six BASIC_LATIN_RE = re.compile(r'[\u0021-\u007E]') WHITESPACE_RE = re.compile("[\s]+", re.UNICODE) def force_text(value): if isinstance(value, six.text_type): return value elif isinstance(value, six.strin...
0e7fdc409c17870ada40f43f72b9b20b7f490519
d_parser/helpers/get_body.py
d_parser/helpers/get_body.py
def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.convert_body_to_unicode(grab.doc.body, bom, encoding, skip_errors, fix_spec_chars)
# TODO: remove useless params def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.body.decode('utf-8', 'ignore')
Rework get body text method
Rework get body text method
Python
mit
Holovin/D_GrabDemo
def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.convert_body_to_unicode(grab.doc.body, bom, encoding, skip_errors, fix_spec_chars) Rework get body text method
# TODO: remove useless params def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.body.decode('utf-8', 'ignore')
<commit_before>def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.convert_body_to_unicode(grab.doc.body, bom, encoding, skip_errors, fix_spec_chars) <commit_msg>Rework get body text method<commit_after>
# TODO: remove useless params def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.body.decode('utf-8', 'ignore')
def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.convert_body_to_unicode(grab.doc.body, bom, encoding, skip_errors, fix_spec_chars) Rework get body text method# TODO: remove useless params def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_...
<commit_before>def get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True): return grab.doc.convert_body_to_unicode(grab.doc.body, bom, encoding, skip_errors, fix_spec_chars) <commit_msg>Rework get body text method<commit_after># TODO: remove useless params def get_body(grab, encoding='c...
68aefd4c1bc682dc04721f5572ab21b609e1818f
manage.py
manage.py
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
Add name_en field due to 'not null' constraint on the Category table
Add name_en field due to 'not null' constraint on the Category table
Python
mit
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
<commit_before>import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', Migrate...
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) #pyli...
<commit_before>import os from app import create_app, db from app.models import User, Category from flask_script import Manager from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', Migrate...
c563c0deb99d3364df3650321c914164d99d32cf
been/source/markdowndirectory.py
been/source/markdowndirectory.py
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-]', '', value).strip().lower()) return ...
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown # slugify from Django source (BSD license) def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-...
Add attribution to slugify function.
Add attribution to slugify function.
Python
bsd-3-clause
chromakode/been
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-]', '', value).strip().lower()) return ...
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown # slugify from Django source (BSD license) def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-...
<commit_before>from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-]', '', value).strip().lower...
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown # slugify from Django source (BSD license) def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-...
from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-]', '', value).strip().lower()) return ...
<commit_before>from been.core import DirectorySource, source_registry from hashlib import sha1 import re import unicodedata import time import markdown def slugify(value): value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore') value = unicode(re.sub('[^\w\s-]', '', value).strip().lower...
8f41ff94ecfceedf14cea03e7f2ca08df380edb0
weight/models.py
weight/models.py
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
Make the verbose name for weight entries more user friendly
Make the verbose name for weight entries more user friendly
Python
agpl-3.0
rolandgeider/wger,petervanderdoes/wger,DeveloperMal/wger,petervanderdoes/wger,kjagoo/wger_stark,rolandgeider/wger,wger-project/wger,petervanderdoes/wger,wger-project/wger,kjagoo/wger_stark,DeveloperMal/wger,kjagoo/wger_stark,wger-project/wger,wger-project/wger,rolandgeider/wger,DeveloperMal/wger,DeveloperMal/wger,kjago...
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
<commit_before># -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
<commit_before># -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
1b0a5388c246dba1707f768e9be08b3a63503a31
samples/python/topology/tweepy/app.py
samples/python/topology/tweepy/app.py
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # def main(): terms = sys.argv[1:] topo = Topology("TweetsUsingTweepy") # Event based source st...
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # # # Requires tweepy to be installed # # pip3 install tweepy # # http://www.tweepy.org/ # # You must ...
Add some info about tweepy
Add some info about tweepy
Python
apache-2.0
IBMStreams/streamsx.topology,ddebrunner/streamsx.topology,wmarshall484/streamsx.topology,wmarshall484/streamsx.topology,ddebrunner/streamsx.topology,wmarshall484/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,ibmkendrick/streamsx.topology,ddebrunner/streamsx.topology,ibmkendrick/streamsx.to...
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # def main(): terms = sys.argv[1:] topo = Topology("TweetsUsingTweepy") # Event based source st...
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # # # Requires tweepy to be installed # # pip3 install tweepy # # http://www.tweepy.org/ # # You must ...
<commit_before>from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # def main(): terms = sys.argv[1:] topo = Topology("TweetsUsingTweepy") # Event ...
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # # # Requires tweepy to be installed # # pip3 install tweepy # # http://www.tweepy.org/ # # You must ...
from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # def main(): terms = sys.argv[1:] topo = Topology("TweetsUsingTweepy") # Event based source st...
<commit_before>from streamsx.topology.topology import * import streamsx.topology.context import sys import tweets # # Continually stream tweets that contain # the terms passed on the command line. # # python3 app.py Food GlutenFree # def main(): terms = sys.argv[1:] topo = Topology("TweetsUsingTweepy") # Event ...
c8a0aee9b68b0567adb8285c3264d244e2ed71ca
bnw/handlers/command_register.py
bnw/handlers/command_register.py
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
Make "register" return False when username is already taken
Make "register" return False when username is already taken
Python
bsd-2-clause
stiletto/bnw,ojab/bnw,ojab/bnw,stiletto/bnw,stiletto/bnw,un-def/bnw,un-def/bnw,stiletto/bnw,ojab/bnw,ojab/bnw,un-def/bnw,un-def/bnw
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
<commit_before># -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE)...
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
# -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE) @defer.inlineC...
<commit_before># -*- coding: utf-8 -*- # from twisted.words.xish import domish from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep from base import * import random import time import bnw.core.bnw_objects as objs def _(s, user): return s from uuid import uuid4 import re @check_arg(name=USER_RE)...
d0c3906a0af504f61f39e1bc2f0fd43a71bda747
sharedmock/asserters.py
sharedmock/asserters.py
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
Remove extraneous quote in asserter dockstring
Remove extraneous quote in asserter dockstring
Python
apache-2.0
elritsch/python-sharedmock
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
<commit_before>from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_di...
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_differ_error(expe...
<commit_before>from pprint import pformat def assert_calls_equal(expected, actual): """ Check whether the given mock object (or mock method) calls are equal and return a nicely formatted message. """ if not expected == actual: raise_calls_differ_error(expected, actual) def raise_calls_di...
b8d812039051addacda3c04d2cfe657a58bc3681
yolk/__init__.py
yolk/__init__.py
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.1'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.2'
Increment patch version to 0.7.2
Increment patch version to 0.7.2
Python
bsd-3-clause
myint/yolk,myint/yolk
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.1' Increment patch version to 0.7.2
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.2'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.1' <commit_msg>Increment patch version to 0.7.2<commit_after>
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.2'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.1' Increment patch version to 0.7.2"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.2'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.1' <commit_msg>Increment patch version to 0.7.2<commit_after>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.7.2'
14f2161efbd9c8377e6ff3675c48aba1ac0c47d5
API/chat/forms.py
API/chat/forms.py
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) class MessageCreationForm(MessageForm): username = f...
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) message_type = forms.CharField(widget=forms.Textarea) ...
Add message_type as CharField in form
Add message_type as CharField in form
Python
mit
gtklocker/ting,gtklocker/ting,mbalamat/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,dionyziz/ting,gtklocker/ting,dionyziz/ting,dionyziz/ting,dionyziz/ting,mbalamat/ting
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) class MessageCreationForm(MessageForm): username = f...
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) message_type = forms.CharField(widget=forms.Textarea) ...
<commit_before>import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) class MessageCreationForm(MessageForm): ...
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) message_type = forms.CharField(widget=forms.Textarea) ...
import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) class MessageCreationForm(MessageForm): username = f...
<commit_before>import time from django import forms from .models import Message from .utils import timestamp_to_datetime, datetime_to_timestamp class MessageForm(forms.Form): text = forms.CharField(widget=forms.Textarea) typing = forms.BooleanField(required=False) class MessageCreationForm(MessageForm): ...
5733c800c10a7546228ec4562e40b2bd06c77c7e
models.py
models.py
from django.db import models # Create your models here.
from django.db import models from django.utils import timezone import datetime class Poll(models.Model): question = models.CharField(max_length=255) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question def was_published_recently(self): return self.pub_date >= timezone....
Improve database model and apperance for admin site
Improve database model and apperance for admin site
Python
mit
egel/polls
from django.db import models # Create your models here. Improve database model and apperance for admin site
from django.db import models from django.utils import timezone import datetime class Poll(models.Model): question = models.CharField(max_length=255) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question def was_published_recently(self): return self.pub_date >= timezone....
<commit_before>from django.db import models # Create your models here. <commit_msg>Improve database model and apperance for admin site<commit_after>
from django.db import models from django.utils import timezone import datetime class Poll(models.Model): question = models.CharField(max_length=255) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question def was_published_recently(self): return self.pub_date >= timezone....
from django.db import models # Create your models here. Improve database model and apperance for admin sitefrom django.db import models from django.utils import timezone import datetime class Poll(models.Model): question = models.CharField(max_length=255) pub_date = models.DateTimeField('date published') def __un...
<commit_before>from django.db import models # Create your models here. <commit_msg>Improve database model and apperance for admin site<commit_after>from django.db import models from django.utils import timezone import datetime class Poll(models.Model): question = models.CharField(max_length=255) pub_date = models....
12320653c58cd9e9a73a6d8d69073a5b64545e5b
tr_init.py
tr_init.py
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.system...
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print("usage: tr_init <language-code>") sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.syste...
Add parentheses to the print statement to make it Python3 compatible
fix: Add parentheses to the print statement to make it Python3 compatible
Python
bsd-3-clause
stueken/microblog,stueken/microblog
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.system...
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print("usage: tr_init <language-code>") sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.syste...
<commit_before>#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot ...
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print("usage: tr_init <language-code>") sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.syste...
#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot app') os.system...
<commit_before>#!flask/bin/python import os import sys if sys.platform == 'win32': pybabel = 'flask\\Scripts\\pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot ...
c0633bc60dda6b81e623795f2c65a1eb0ba5933d
blinkytape/blinkyplayer.py
blinkytape/blinkyplayer.py
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._make_finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
Clean up BlinkyPlayer a little
Clean up BlinkyPlayer a little
Python
mit
jonspeicher/blinkyfun
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._make_finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
<commit_before>import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._make_finished_predicate(animation, num_cycles) animation.begin() while not fi...
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._make_finished_predicate(animation, num_cycles) animation.begin() while not finished(): ...
<commit_before>import time class BlinkyPlayer(object): FOREVER = -1 def __init__(self, blinkytape): self._blinkytape = blinkytape def play(self, animation, num_cycles = FOREVER): finished = self._make_finished_predicate(animation, num_cycles) animation.begin() while not fi...
5bc6f65828e9fbf9d2a5b1198a9625024fd72d6e
weather.py
weather.py
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
Make cloud check evaluate greater than or equals
Make cloud check evaluate greater than or equals
Python
mit
Nosskirneh/SmartRemoteControl,Nosskirneh/SmartRemoteControl,Nosskirneh/SmartRemoteControl,Nosskirneh/SmartRemoteControl,Nosskirneh/SmartRemoteControl
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
<commit_before>from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): ...
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): self.data = se...
<commit_before>from pyowm.owm import OWM from datetime import datetime, timedelta class WeatherManager: def __init__(self, key, lat, lon): owm = OWM(key) self.mgr = owm.weather_manager() self.lat = lat self.lon = lon self.last_updated = None def load_data(self): ...
027e78f3e88a17e05881259d1f29d472b02d0d3a
doc/source/scripts/titles.py
doc/source/scripts/titles.py
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
Change to 3 spaces in front of toctree elements
Change to 3 spaces in front of toctree elements
Python
mit
AdamGagorik/pydarkstar
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
<commit_before>import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) ...
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) with open(pat...
<commit_before>import shutil import os import re work = os.getcwd() found = [] regex = re.compile(r'pydarkstar\.(.*)\.rst') for root, dirs, files in os.walk(work): for f in files: m = regex.match(f) if m: found.append((root, f)) for root, f in found: path = os.path.join(root, f) ...
72f28cfa2723faaa7f7ed2b165fd99b214bc67c9
MeetingMinutes.py
MeetingMinutes.py
import sublime, sublime_plugin import os import re from .mistune import markdown class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_source = self.view.substr(region) md_source.encode(encoding='UTF-8',errors='strict') html_source = '<!D...
import sublime, sublime_plugin import os import re from .mistune import markdown HTML_START = '<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>' HTML_END = '</body></html>' class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_s...
Create variables for HTML start and end.
Create variables for HTML start and end.
Python
mit
Txarli/sublimetext-meeting-minutes,Txarli/sublimetext-meeting-minutes
import sublime, sublime_plugin import os import re from .mistune import markdown class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_source = self.view.substr(region) md_source.encode(encoding='UTF-8',errors='strict') html_source = '<!D...
import sublime, sublime_plugin import os import re from .mistune import markdown HTML_START = '<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>' HTML_END = '</body></html>' class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_s...
<commit_before>import sublime, sublime_plugin import os import re from .mistune import markdown class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_source = self.view.substr(region) md_source.encode(encoding='UTF-8',errors='strict') htm...
import sublime, sublime_plugin import os import re from .mistune import markdown HTML_START = '<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>' HTML_END = '</body></html>' class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_s...
import sublime, sublime_plugin import os import re from .mistune import markdown class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_source = self.view.substr(region) md_source.encode(encoding='UTF-8',errors='strict') html_source = '<!D...
<commit_before>import sublime, sublime_plugin import os import re from .mistune import markdown class CreateMinuteCommand(sublime_plugin.TextCommand): def run(self, edit): region = sublime.Region(0, self.view.size()) md_source = self.view.substr(region) md_source.encode(encoding='UTF-8',errors='strict') htm...
5ede88c91f61b4aeb3a1e9b55e6b7836cf805255
django_filepicker/utils.py
django_filepicker/utils.py
import re import urllib from os.path import basename from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise...
import re import urllib import os from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise ValueError('Not a ...
Add context manager and destructor for cleanup
Add context manager and destructor for cleanup When exiting the context or calling cleanup() explicitly, the temporary file created after downloading is removed and any open files closed.
Python
mit
FundedByMe/filepicker-django,FundedByMe/filepicker-django,filepicker/filepicker-django,filepicker/filepicker-django
import re import urllib from os.path import basename from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise...
import re import urllib import os from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise ValueError('Not a ...
<commit_before>import re import urllib from os.path import basename from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): ...
import re import urllib import os from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise ValueError('Not a ...
import re import urllib from os.path import basename from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): raise...
<commit_before>import re import urllib from os.path import basename from django.core.files import File class FilepickerFile(object): filepicker_url_regex = re.compile( r'https?:\/\/www.filepicker.io\/api\/file\/.*') def __init__(self, url): if not self.filepicker_url_regex.match(url): ...
13d0b4b50b2eaaf5c557576b7b45a378d901c49c
src/zeit/cms/testcontenttype/interfaces.py
src/zeit/cms/testcontenttype/interfaces.py
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing.""" ITestContentType.setTaggedValue('zeit.cms.type', 'testcontenttype')
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing."""
Remove superfluous type annotation, it's done by the TypeGrokker now
Remove superfluous type annotation, it's done by the TypeGrokker now
Python
bsd-3-clause
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing.""" ITestContentType.setTaggedValue('zeit.cms.type', 'testcontenttype') Remove super...
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing."""
<commit_before># Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing.""" ITestContentType.setTaggedValue('zeit.cms.type', 'testcontenttype...
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing."""
# Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing.""" ITestContentType.setTaggedValue('zeit.cms.type', 'testcontenttype') Remove super...
<commit_before># Copyright (c) 2007-2011 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Interface definitions for the test content type.""" import zope.interface class ITestContentType(zope.interface.Interface): """A type for testing.""" ITestContentType.setTaggedValue('zeit.cms.type', 'testcontenttype...
8f993412a0110085fee10331daecfb3d36973518
__init__.py
__init__.py
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
Add reload to init for config
Add reload to init for config
Python
mit
reticulatingspline/Scores,cottongin/Scores
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
<commit_before>### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may w...
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
<commit_before>### # Copyright (c) 2012, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may w...
f447e8fa50770d133d53e69477292b3925203c64
modular_blocks/models.py
modular_blocks/models.py
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField() sidebar_right = ListTextField() class Meta: abstract = True
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField( blank=True, null=True, ) sidebar_right = ListTextField( lank=True, null=True, ) class Meta: abstract = True
Add null and blank to sidebars
Add null and blank to sidebars
Python
agpl-3.0
rezometz/django-modular-blocks,rezometz/django-modular-blocks,rezometz/django-modular-blocks
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField() sidebar_right = ListTextField() class Meta: abstract = True Add null and blank to sidebars
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField( blank=True, null=True, ) sidebar_right = ListTextField( lank=True, null=True, ) class Meta: abstract = True
<commit_before>from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField() sidebar_right = ListTextField() class Meta: abstract = True <commit_msg>Add null and blank to sidebars<commit_after>
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField( blank=True, null=True, ) sidebar_right = ListTextField( lank=True, null=True, ) class Meta: abstract = True
from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField() sidebar_right = ListTextField() class Meta: abstract = True Add null and blank to sidebarsfrom django.db import models from .fields import ListTextField cl...
<commit_before>from django.db import models from .fields import ListTextField class TwoModularColumnsMixin(models.Model): sidebar_left = ListTextField() sidebar_right = ListTextField() class Meta: abstract = True <commit_msg>Add null and blank to sidebars<commit_after>from django.db import model...
b63b22678a005baa6195854b65cc1828061febba
vx/mode.py
vx/mode.py
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', '\t') self.keywords = () class python_mod...
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode elif ext == '.py': return python_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', ...
Add .py extension handling and more python keywords
Add .py extension handling and more python keywords
Python
mit
philipdexter/vx,philipdexter/vx
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', '\t') self.keywords = () class python_mod...
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode elif ext == '.py': return python_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', ...
<commit_before>import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', '\t') self.keywords = () c...
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode elif ext == '.py': return python_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', ...
import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', '\t') self.keywords = () class python_mod...
<commit_before>import vx import os.path def mode_from_filename(file): root, ext = os.path.splitext(file) ext = ext if ext else root mode = None if ext == '.c': return c_mode class mode: def __init__(self, window): self.breaks = ('_', ' ', '\n', '\t') self.keywords = () c...
f62980f99654b22930cac6716410b145b590221f
Lib/lib-tk/FixTk.py
Lib/lib-tk/FixTk.py
import sys, os v = os.path.join(sys.prefix, "tcl", "tcl8.3") if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v
import sys, os, _tkinter ver = str(_tkinter.TCL_VERSION) v = os.path.join(sys.prefix, "tcl", "tcl"+ver) if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v
Work the Tcl version number in the path we search for.
Work the Tcl version number in the path we search for.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
import sys, os v = os.path.join(sys.prefix, "tcl", "tcl8.3") if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v Work the Tcl version number in the path we search for.
import sys, os, _tkinter ver = str(_tkinter.TCL_VERSION) v = os.path.join(sys.prefix, "tcl", "tcl"+ver) if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v
<commit_before>import sys, os v = os.path.join(sys.prefix, "tcl", "tcl8.3") if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v <commit_msg>Work the Tcl version number in the path we search for.<commit_after>
import sys, os, _tkinter ver = str(_tkinter.TCL_VERSION) v = os.path.join(sys.prefix, "tcl", "tcl"+ver) if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v
import sys, os v = os.path.join(sys.prefix, "tcl", "tcl8.3") if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v Work the Tcl version number in the path we search for.import sys, os, _tkinter ver = str(_tkinter.TCL_VERSION) v = os.path.join(sys.prefix, "tcl", "tcl"+ver) if os.path.exists(o...
<commit_before>import sys, os v = os.path.join(sys.prefix, "tcl", "tcl8.3") if os.path.exists(os.path.join(v, "init.tcl")): os.environ["TCL_LIBRARY"] = v <commit_msg>Work the Tcl version number in the path we search for.<commit_after>import sys, os, _tkinter ver = str(_tkinter.TCL_VERSION) v = os.path.join(sys.pref...
49b24fe2c524923e200ce8495055b0b59d83eb6d
__init__.py
__init__.py
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
Set plugin version to "master" to show which Cura branch this plugin branch should work with
Set plugin version to "master" to show which Cura branch this plugin branch should work with
Python
agpl-3.0
fieldOfView/OctoPrintPlugin
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", ...
1c43affbd82f68ed8956cd407c494ff46dab9203
examples/IPLoM_example.py
examples/IPLoM_example.py
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address standard_file = standard_path + 'auth.log.anon.labeled' analyzed_file = 'auth.log.anon' pre...
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/' groundtruth_file = dataset_path + 'Dec 1.log.labeled' analyzed_file = 'Dec 1.log' OutputPath = '/home/hudan/Git/pygraphc/result/...
Edit path and external evaluation
Edit path and external evaluation
Python
mit
studiawan/pygraphc
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address standard_file = standard_path + 'auth.log.anon.labeled' analyzed_file = 'auth.log.anon' pre...
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/' groundtruth_file = dataset_path + 'Dec 1.log.labeled' analyzed_file = 'Dec 1.log' OutputPath = '/home/hudan/Git/pygraphc/result/...
<commit_before>from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address standard_file = standard_path + 'auth.log.anon.labeled' analyzed_file = 'aut...
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/' groundtruth_file = dataset_path + 'Dec 1.log.labeled' analyzed_file = 'Dec 1.log' OutputPath = '/home/hudan/Git/pygraphc/result/...
from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address standard_file = standard_path + 'auth.log.anon.labeled' analyzed_file = 'auth.log.anon' pre...
<commit_before>from pygraphc.misc.IPLoM import * from pygraphc.evaluation.ExternalEvaluation import * # set input path ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address standard_file = standard_path + 'auth.log.anon.labeled' analyzed_file = 'aut...
6e1126fe9a8269ff4489ee338000afc852bce922
oidc_apis/id_token.py
oidc_apis/id_token.py
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
Add username to ID Token
Add username to ID Token
Python
mit
mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
<commit_before>import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get...
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get('scope', []) ...
<commit_before>import inspect from .scopes import get_userinfo_by_scopes def process_id_token(payload, user, scope=None): if scope is None: # HACK: Steal the scope argument from the locals dictionary of # the caller, since it was not passed to us scope = inspect.stack()[1][0].f_locals.get...
b47e3677120b9b2d64d38b48b0382dc7986a1b82
opps/core/__init__.py
opps/core/__init__.py
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings trans_app_label = _('Opps') settings.INSTALLED_APPS += ('opps.article', 'opps.image', 'opps.channel', 'opps.source', 'redactor', 'tagging',) settings.REDACTOR_OPTI...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ trans_app_label = _('Opps')
Remove installed app on init opps core
Remove installed app on init opps core
Python
mit
YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings trans_app_label = _('Opps') settings.INSTALLED_APPS += ('opps.article', 'opps.image', 'opps.channel', 'opps.source', 'redactor', 'tagging',) settings.REDACTOR_OPTI...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ trans_app_label = _('Opps')
<commit_before># -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings trans_app_label = _('Opps') settings.INSTALLED_APPS += ('opps.article', 'opps.image', 'opps.channel', 'opps.source', 'redactor', 'tagging',) setting...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ trans_app_label = _('Opps')
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings trans_app_label = _('Opps') settings.INSTALLED_APPS += ('opps.article', 'opps.image', 'opps.channel', 'opps.source', 'redactor', 'tagging',) settings.REDACTOR_OPTI...
<commit_before># -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings trans_app_label = _('Opps') settings.INSTALLED_APPS += ('opps.article', 'opps.image', 'opps.channel', 'opps.source', 'redactor', 'tagging',) setting...
52d15d09ed079d1b8598f314524066b56273af3d
addie/_version.py
addie/_version.py
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "full-revisionid...
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json version_json = ''' { "dirty": false, "error": null, "full-revisionid": "aaeac97...
Remove sys import in versioneer file
Remove sys import in versioneer file
Python
mit
neutrons/FastGR,neutrons/FastGR,neutrons/FastGR
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "full-revisionid...
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json version_json = ''' { "dirty": false, "error": null, "full-revisionid": "aaeac97...
<commit_before> # This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "...
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json version_json = ''' { "dirty": false, "error": null, "full-revisionid": "aaeac97...
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "full-revisionid...
<commit_before> # This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "...
25a97de30fcc9cddd7f58cd25584fd726f0cc8e4
guild/commands/packages_list.py
guild/commands/packages_list.py
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Clarify meaning of --all option for packages command
Clarify meaning of --all option for packages command
Python
apache-2.0
guildai/guild,guildai/guild,guildai/guild,guildai/guild
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright 2017-2020 TensorHub, Inc. # # 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 ag...
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright 2017-2020 TensorHub, Inc. # # 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 ag...
ccdeb23eb54191913a97b48907e0738f6969ce58
tests/factories/config.py
tests/factories/config.py
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
Add correct properties for payment_in_default test group
Add correct properties for payment_in_default test group
Python
apache-2.0
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config f...
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
# -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config from .base impor...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from factory import SubFactory from pycroft.model.config import Config f...
fb9c56381d259de7d1765ca0e058f82d61e4e975
examples/ellipses_FreeCAD.py
examples/ellipses_FreeCAD.py
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) + ".\.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 for ellipse in data: cx, cy, b, a, ang = ellips...
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) #+ "/.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 radii = [] for ellipse in data: cx, cy, b, a, a...
Add radii mean and standard deviation
Add radii mean and standard deviation
Python
mit
nicoguaro/ellipse_packing
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) + ".\.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 for ellipse in data: cx, cy, b, a, ang = ellips...
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) #+ "/.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 radii = [] for ellipse in data: cx, cy, b, a, a...
<commit_before>from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) + ".\.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 for ellipse in data: cx, cy, b, ...
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) #+ "/.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 radii = [] for ellipse in data: cx, cy, b, a, a...
from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) + ".\.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 for ellipse in data: cx, cy, b, a, ang = ellips...
<commit_before>from __future__ import division import numpy as np import FreeCAD as FC import Part import Draft import os doc = FC.newDocument("ellipses") folder = os.path.dirname(__file__) + ".\.." fname = folder + "/vor_ellipses.txt" data = np.loadtxt(fname) shapes = [] area = 0 for ellipse in data: cx, cy, b, ...
08de3f0bf326e8625462d9dbdb7297d8749bc416
examples/joystick_example.py
examples/joystick_example.py
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
Replace tabs by space in example
joystick: Replace tabs by space in example Signed-off-by: Francois Berder <[email protected]>
Python
bsd-3-clause
francois-berder/PyLetMeCreate
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before ru...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before ru...
98a4cd76ce9ecb81675ebaa29b249a8d80347e0d
zc-list.py
zc-list.py
#!/usr/bin/env python import client_wrap KEY_LONG = "key1" DATA_LONG = 1024 KEY_DOUBLE = "key2" DATA_DOUBLE = 100.53 KEY_STRING = "key3" DATA_STRING = "test data" def init_data(client): client.WriteLong(KEY_LONG, DATA_LONG) client.WriteDouble(KEY_DOUBLE, DATA_DOUBLE) client.WriteString(KEY_STRING, DATA...
#!/usr/bin/env python import client_wrap def main(): client = client_wrap.ClientWrap("get_test.log", "ipc:///var/run/zero-cache/0", 0) key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: return print keys if __name__ == "__main__": main()
Implement displaying of the current key list
Implement displaying of the current key list
Python
agpl-3.0
ellysh/zero-cache-utils,ellysh/zero-cache-utils
#!/usr/bin/env python import client_wrap KEY_LONG = "key1" DATA_LONG = 1024 KEY_DOUBLE = "key2" DATA_DOUBLE = 100.53 KEY_STRING = "key3" DATA_STRING = "test data" def init_data(client): client.WriteLong(KEY_LONG, DATA_LONG) client.WriteDouble(KEY_DOUBLE, DATA_DOUBLE) client.WriteString(KEY_STRING, DATA...
#!/usr/bin/env python import client_wrap def main(): client = client_wrap.ClientWrap("get_test.log", "ipc:///var/run/zero-cache/0", 0) key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: return print keys if __name__ == "__main__": main()
<commit_before>#!/usr/bin/env python import client_wrap KEY_LONG = "key1" DATA_LONG = 1024 KEY_DOUBLE = "key2" DATA_DOUBLE = 100.53 KEY_STRING = "key3" DATA_STRING = "test data" def init_data(client): client.WriteLong(KEY_LONG, DATA_LONG) client.WriteDouble(KEY_DOUBLE, DATA_DOUBLE) client.WriteString(K...
#!/usr/bin/env python import client_wrap def main(): client = client_wrap.ClientWrap("get_test.log", "ipc:///var/run/zero-cache/0", 0) key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: return print keys if __name__ == "__main__": main()
#!/usr/bin/env python import client_wrap KEY_LONG = "key1" DATA_LONG = 1024 KEY_DOUBLE = "key2" DATA_DOUBLE = 100.53 KEY_STRING = "key3" DATA_STRING = "test data" def init_data(client): client.WriteLong(KEY_LONG, DATA_LONG) client.WriteDouble(KEY_DOUBLE, DATA_DOUBLE) client.WriteString(KEY_STRING, DATA...
<commit_before>#!/usr/bin/env python import client_wrap KEY_LONG = "key1" DATA_LONG = 1024 KEY_DOUBLE = "key2" DATA_DOUBLE = 100.53 KEY_STRING = "key3" DATA_STRING = "test data" def init_data(client): client.WriteLong(KEY_LONG, DATA_LONG) client.WriteDouble(KEY_DOUBLE, DATA_DOUBLE) client.WriteString(K...
1f6c830e68aede8a2267b5749b911d87801f9e5b
setup.py
setup.py
from setuptools import setup setup( name='django-setmagic', version='0.2', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
from setuptools import setup setup( name='django-setmagic', version='0.2.1', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
Include templates and static at the installing process too
Include templates and static at the installing process too
Python
mit
7ws/django-setmagic
from setuptools import setup setup( name='django-setmagic', version='0.2', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
from setuptools import setup setup( name='django-setmagic', version='0.2.1', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
<commit_before>from setuptools import setup setup( name='django-setmagic', version='0.2', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'djan...
from setuptools import setup setup( name='django-setmagic', version='0.2.1', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
from setuptools import setup setup( name='django-setmagic', version='0.2', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'django >= 1.5', ...
<commit_before>from setuptools import setup setup( name='django-setmagic', version='0.2', author='Evandro Myller', author_email='[email protected]', description='Magically editable settings for winged pony lovers', url='https://github.com/7ws/django-setmagic', install_requires=[ 'djan...
2049be18b864fe2dab61ca6258b2295b3270d5c2
setup.py
setup.py
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
Add pytest as a dependency
Add pytest as a dependency
Python
mit
kxgames/kxg
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
<commit_before>import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com...
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com/kxgames/GameEn...
<commit_before>import distutils.core # Uploading to PyPI # ================= # $ python setup.py register -r pypi # $ python setup.py sdist upload -r pypi version = '0.0' distutils.core.setup( name='kxg', version=version, author='Kale Kundert and Alex Mitchell', url='https://github.com...
cb528fbb990e8cd3d301fcbf60069b33a68b9cac
setup.py
setup.py
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
Revert "Specify specific version of feedparser"
Revert "Specify specific version of feedparser" This reverts commit e2a6bc54e404538f01a980f1573a507c224d1c31.
Python
apache-2.0
cscutcher/showtransmission
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
<commit_before>#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", descrip...
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", description=("Script t...
<commit_before>#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="ShowTransmission", version="0.1", packages=find_packages(), author="Chris Scutcher", author_email="[email protected]", descrip...
a61386cbbcbe3e68bcdf0a98c23547117a496fec
zerver/views/webhooks/github_dispatcher.py
zerver/views/webhooks/github_dispatcher.py
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from .github_webhook import api_github_webhook from .github import api_github_landing def api_github_webhook_dispatch(request): # type: (HttpRequest) -> HttpResponse if request.META.get('HTTP_X_GITHUB_EVENT'): ret...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from .github_webhook import api_github_webhook from .github import api_github_landing # Since this dispatcher is an API-style endpoint, it needs to be # explicitly marked as CSR...
Fix GitHub integration CSRF issue.
github: Fix GitHub integration CSRF issue. The new GitHub dispatcher integration was apparently totally broken, because we hadn't tagged the new dispatcher endpoint as exempt from CSRF checking. I'm not sure why the test suite didn't catch this.
Python
apache-2.0
AZtheAsian/zulip,dhcrzf/zulip,JPJPJPOPOP/zulip,christi3k/zulip,hackerkid/zulip,verma-varsha/zulip,j831/zulip,Diptanshu8/zulip,dhcrzf/zulip,ryanbackman/zulip,shubhamdhama/zulip,Galexrt/zulip,hackerkid/zulip,andersk/zulip,amyliu345/zulip,j831/zulip,mahim97/zulip,brainwane/zulip,SmartPeople/zulip,ryanbackman/zulip,Galexrt...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from .github_webhook import api_github_webhook from .github import api_github_landing def api_github_webhook_dispatch(request): # type: (HttpRequest) -> HttpResponse if request.META.get('HTTP_X_GITHUB_EVENT'): ret...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from .github_webhook import api_github_webhook from .github import api_github_landing # Since this dispatcher is an API-style endpoint, it needs to be # explicitly marked as CSR...
<commit_before>from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from .github_webhook import api_github_webhook from .github import api_github_landing def api_github_webhook_dispatch(request): # type: (HttpRequest) -> HttpResponse if request.META.get('HTTP_X_GITHUB_EVENT...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from .github_webhook import api_github_webhook from .github import api_github_landing # Since this dispatcher is an API-style endpoint, it needs to be # explicitly marked as CSR...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from .github_webhook import api_github_webhook from .github import api_github_landing def api_github_webhook_dispatch(request): # type: (HttpRequest) -> HttpResponse if request.META.get('HTTP_X_GITHUB_EVENT'): ret...
<commit_before>from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from .github_webhook import api_github_webhook from .github import api_github_landing def api_github_webhook_dispatch(request): # type: (HttpRequest) -> HttpResponse if request.META.get('HTTP_X_GITHUB_EVENT...
a7c49480e1eb530aa4df494709ec1f7edd875e1a
devito/ir/clusters/analysis.py
devito/ir/clusters/analysis.py
from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) __all__ = ['analyze'] def analyze(clusters): return clusters
from collections import OrderedDict from devito.ir.clusters.queue import Queue from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) from devito.tools import timed_pass __all__ = ['analyze'] class State(object): def __init__(self): ...
Add machinery to detect Cluster properties
ir: Add machinery to detect Cluster properties
Python
mit
opesci/devito,opesci/devito
from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) __all__ = ['analyze'] def analyze(clusters): return clusters ir: Add machinery to detect Cluster properties
from collections import OrderedDict from devito.ir.clusters.queue import Queue from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) from devito.tools import timed_pass __all__ = ['analyze'] class State(object): def __init__(self): ...
<commit_before>from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) __all__ = ['analyze'] def analyze(clusters): return clusters <commit_msg>ir: Add machinery to detect Cluster properties<commit_after>
from collections import OrderedDict from devito.ir.clusters.queue import Queue from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) from devito.tools import timed_pass __all__ = ['analyze'] class State(object): def __init__(self): ...
from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) __all__ = ['analyze'] def analyze(clusters): return clusters ir: Add machinery to detect Cluster propertiesfrom collections import OrderedDict from devito.ir.clusters.queue import ...
<commit_before>from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, VECTOR, TILABLE, WRAPPABLE) __all__ = ['analyze'] def analyze(clusters): return clusters <commit_msg>ir: Add machinery to detect Cluster properties<commit_after>from collections import OrderedDi...
b362e6060abe631f25e5227664df4e1670f4d630
registration/admin.py
registration/admin.py
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin)
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Python
bsd-3-clause
arpitremarkable/django-registration,sergafts/django-registration,wy123123/django-registration,wda-hb/test,furious-luke/django-registration,imgmix/django-registration,matejkloska/django-registration,PetrDlouhy/django-registration,pando85/django-registration,yorkedork/django-registration,pando85/django-registration,perci...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
47f2ee4587df189864029a2260b642547ea7355f
config.py
config.py
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
Put empty string in for quickPickFile if it doesn't exist.
Put empty string in for quickPickFile if it doesn't exist.
Python
apache-2.0
Plourde-Research-Lab/PyQLab,BBN-Q/PyQLab,rmcgurrin/PyQLab,calebjordan/PyQLab
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
<commit_before>#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile...
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile = os.path.join...
<commit_before>#Package startup stuff so people can start their iPython session with # #run PyQLab /path/to/cfgFile and be up and running #Package imports import numpy as np #Load the configuration from the json file and populate the global configuration dictionary import json import os.path import sys PyQLabCfgFile...
d60b0ee8c212728721f47cc57303ae24888cc387
models.py
models.py
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
Add support for carriage returns
Add support for carriage returns
Python
apache-2.0
agateau/tmc2,agateau/tmc2
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
<commit_before>import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): ret...
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): return Markup(self...
<commit_before>import datetime import math from flask import Markup from peewee import Model, TextField, DateTimeField from app import db class Quote(Model): content = TextField() timestamp = DateTimeField(default=datetime.datetime.now) class Meta: database = db def html(self): ret...
37333506e6866e7d0859c5068f115a3e1b9dec3a
test/test_coordinate.py
test/test_coordinate.py
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
Add unit tests for fail fast logic in convertCharToInt()
Add unit tests for fail fast logic in convertCharToInt()
Python
mit
blairck/jaeger
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
<commit_before>import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.a...
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.assertEqual(actu...
<commit_before>import unittest from src import coordinate class TestRules(unittest.TestCase): """ Tests for the coordinate module """ def test_get_x_board(self): board_location = coordinate.Coordinate(4, 6) expected_result = 4 actual_result = board_location.get_x_board() self.a...
4622c1d2623468503b5d51683f953b82ca611b35
vumi/demos/tests/test_static_reply.py
vumi/demos/tests/test_static_reply.py
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.utils import ApplicationTestCase from vumi.demos.static_reply import StaticReplyApplication class TestStaticReplyApplication(ApplicationTestCase): application_class = StaticReplyApplication @inlineCallbacks def test_receive_m...
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.helpers import ApplicationHelper from vumi.demos.static_reply import StaticReplyApplication from vumi.tests.helpers import VumiTestCase class TestStaticReplyApplication(VumiTestCase): def setUp(self): self.app_helper = Applica...
Switch static_reply tests to new helpers.
Switch static_reply tests to new helpers.
Python
bsd-3-clause
vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi,harrissoerja/vumi
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.utils import ApplicationTestCase from vumi.demos.static_reply import StaticReplyApplication class TestStaticReplyApplication(ApplicationTestCase): application_class = StaticReplyApplication @inlineCallbacks def test_receive_m...
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.helpers import ApplicationHelper from vumi.demos.static_reply import StaticReplyApplication from vumi.tests.helpers import VumiTestCase class TestStaticReplyApplication(VumiTestCase): def setUp(self): self.app_helper = Applica...
<commit_before>from twisted.internet.defer import inlineCallbacks from vumi.application.tests.utils import ApplicationTestCase from vumi.demos.static_reply import StaticReplyApplication class TestStaticReplyApplication(ApplicationTestCase): application_class = StaticReplyApplication @inlineCallbacks def...
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.helpers import ApplicationHelper from vumi.demos.static_reply import StaticReplyApplication from vumi.tests.helpers import VumiTestCase class TestStaticReplyApplication(VumiTestCase): def setUp(self): self.app_helper = Applica...
from twisted.internet.defer import inlineCallbacks from vumi.application.tests.utils import ApplicationTestCase from vumi.demos.static_reply import StaticReplyApplication class TestStaticReplyApplication(ApplicationTestCase): application_class = StaticReplyApplication @inlineCallbacks def test_receive_m...
<commit_before>from twisted.internet.defer import inlineCallbacks from vumi.application.tests.utils import ApplicationTestCase from vumi.demos.static_reply import StaticReplyApplication class TestStaticReplyApplication(ApplicationTestCase): application_class = StaticReplyApplication @inlineCallbacks def...
bb04512cdf264a3ef87f3d0093db9fe10723a668
core/wsgi.py
core/wsgi.py
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os, sys, site site.addsitedir('/usr/local/share/virtualenvs/guhema/lib/python3.4/site-package...
Add pathts for apache deployment
Add pathts for apache deployment
Python
mit
n2o/guhema,n2o/guhema
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os, sys, site site.addsitedir('/usr/local/share/virtualenvs/guhema/lib/python3.4/site-package...
<commit_before>""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("...
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os, sys, site site.addsitedir('/usr/local/share/virtualenvs/guhema/lib/python3.4/site-package...
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
<commit_before>""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("...
1c1f2cab677ead5f3cf3aa59c5094a741378e5bc
dame/dame.py
dame/dame.py
__author__ = "Richard Lindsley" import sys import sip sip.setapi('QDate', 2) sip.setapi('QDateTime', 2) sip.setapi('QString', 2) sip.setapi('QTextStream', 2) sip.setapi('QTime', 2) sip.setapi('QUrl', 2) sip.setapi('QVariant', 2) from PyQt4 import Qt def main(): qt_app = Qt.QApplication(sys.argv) label = Qt.Q...
__author__ = "Richard Lindsley" import sys #import sip #sip.setapi('QDate', 2) #sip.setapi('QDateTime', 2) #sip.setapi('QString', 2) #sip.setapi('QTextStream', 2) #sip.setapi('QTime', 2) #sip.setapi('QUrl', 2) #sip.setapi('QVariant', 2) #from PyQt4 import Qt from PySide.QtCore import * from PySide.QtGui import * d...
Use pyside instead of pyqt4
Use pyside instead of pyqt4
Python
mit
richli/dame
__author__ = "Richard Lindsley" import sys import sip sip.setapi('QDate', 2) sip.setapi('QDateTime', 2) sip.setapi('QString', 2) sip.setapi('QTextStream', 2) sip.setapi('QTime', 2) sip.setapi('QUrl', 2) sip.setapi('QVariant', 2) from PyQt4 import Qt def main(): qt_app = Qt.QApplication(sys.argv) label = Qt.Q...
__author__ = "Richard Lindsley" import sys #import sip #sip.setapi('QDate', 2) #sip.setapi('QDateTime', 2) #sip.setapi('QString', 2) #sip.setapi('QTextStream', 2) #sip.setapi('QTime', 2) #sip.setapi('QUrl', 2) #sip.setapi('QVariant', 2) #from PyQt4 import Qt from PySide.QtCore import * from PySide.QtGui import * d...
<commit_before>__author__ = "Richard Lindsley" import sys import sip sip.setapi('QDate', 2) sip.setapi('QDateTime', 2) sip.setapi('QString', 2) sip.setapi('QTextStream', 2) sip.setapi('QTime', 2) sip.setapi('QUrl', 2) sip.setapi('QVariant', 2) from PyQt4 import Qt def main(): qt_app = Qt.QApplication(sys.argv) ...
__author__ = "Richard Lindsley" import sys #import sip #sip.setapi('QDate', 2) #sip.setapi('QDateTime', 2) #sip.setapi('QString', 2) #sip.setapi('QTextStream', 2) #sip.setapi('QTime', 2) #sip.setapi('QUrl', 2) #sip.setapi('QVariant', 2) #from PyQt4 import Qt from PySide.QtCore import * from PySide.QtGui import * d...
__author__ = "Richard Lindsley" import sys import sip sip.setapi('QDate', 2) sip.setapi('QDateTime', 2) sip.setapi('QString', 2) sip.setapi('QTextStream', 2) sip.setapi('QTime', 2) sip.setapi('QUrl', 2) sip.setapi('QVariant', 2) from PyQt4 import Qt def main(): qt_app = Qt.QApplication(sys.argv) label = Qt.Q...
<commit_before>__author__ = "Richard Lindsley" import sys import sip sip.setapi('QDate', 2) sip.setapi('QDateTime', 2) sip.setapi('QString', 2) sip.setapi('QTextStream', 2) sip.setapi('QTime', 2) sip.setapi('QUrl', 2) sip.setapi('QVariant', 2) from PyQt4 import Qt def main(): qt_app = Qt.QApplication(sys.argv) ...
08fbd4b934bc4459bb46025620b906e93f8f293e
voer/settings/dev.py
voer/settings/dev.py
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
Correct the VPR URL in setting
Correct the VPR URL in setting
Python
agpl-3.0
voer-platform/vp.web,voer-platform/vp.web,voer-platform/vp.web,voer-platform/vp.web
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
<commit_before>''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'v...
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
<commit_before>''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'v...
06542afc4becb4cf3cf96dd15ab240ab4353bf2b
ca/views.py
ca/views.py
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): return render_template('index.html') @app.route('/', methods=['POST']) def post_request(): form = RequestForm(request.form) if f...
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): form = RequestForm() return render_template('index.html', form=form) @app.route('/', methods=['POST']) def post_request(): form ...
Create form on index view
Create form on index view - Need to always pass a form to the view - make sure to create on for the `GET` view - Fixes #33
Python
mit
freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): return render_template('index.html') @app.route('/', methods=['POST']) def post_request(): form = RequestForm(request.form) if f...
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): form = RequestForm() return render_template('index.html', form=form) @app.route('/', methods=['POST']) def post_request(): form ...
<commit_before>from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): return render_template('index.html') @app.route('/', methods=['POST']) def post_request(): form = RequestForm(request...
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): form = RequestForm() return render_template('index.html', form=form) @app.route('/', methods=['POST']) def post_request(): form ...
from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): return render_template('index.html') @app.route('/', methods=['POST']) def post_request(): form = RequestForm(request.form) if f...
<commit_before>from flask import request, render_template from ca import app, db from ca.forms import RequestForm from ca.models import Request @app.route('/', methods=['GET']) def index(): return render_template('index.html') @app.route('/', methods=['POST']) def post_request(): form = RequestForm(request...
fa0f65b6b216a869cc6f1503e7af51481b570b78
player.py
player.py
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name self.remaining...
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name def __repr__(self...
Remove unused time control support (better in Game)
Remove unused time control support (better in Game)
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name self.remaining...
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name def __repr__(self...
<commit_before> # This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name ...
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name def __repr__(self...
# This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name self.remaining...
<commit_before> # This is just be a base class / interface to be filled out by # human and AI players. # TODO: Undo support? # TODO: Resign? # super requires inheriting from object, which clashes with pickle?! #class Player(object): class Player(): def __init__(self, p_name): self.p_name = p_name ...
9605b60fb537714c295dfa0f50313e38f89d2d88
app.py
app.py
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) if 'DYNO' in os.environ: sslify = SSLify(app) @app.rou...
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') def find_key(token): if token == os.environ.get("ACME_TOKEN"): return os....
Add letsencrypt auto renew api :octocat:
Add letsencrypt auto renew api :octocat:
Python
mit
caimaoy/pysheeet
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) if 'DYNO' in os.environ: sslify = SSLify(app) @app.rou...
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') def find_key(token): if token == os.environ.get("ACME_TOKEN"): return os....
<commit_before>""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) if 'DYNO' in os.environ: sslify = SSLify...
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') def find_key(token): if token == os.environ.get("ACME_TOKEN"): return os....
""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) if 'DYNO' in os.environ: sslify = SSLify(app) @app.rou...
<commit_before>""" This is a simple cheatsheet webapp. """ import os from flask import Flask, send_from_directory from flask_sslify import SSLify DIR = os.path.dirname(os.path.realpath(__file__)) ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) if 'DYNO' in os.environ: sslify = SSLify...
a621a7803d177e4851d229973586d9b114b0f84c
__init__.py
__init__.py
# -*- coding: utf-8 -*- from flask import Flask from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config.read('config/conf...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config....
Create a catch-all route and route to the homepage.
Create a catch-all route and route to the homepage. Signed-off-by: Robert Dempsey <[email protected]>
Python
mit
rdempsey/weight-tracker,rdempsey/weight-tracker,rdempsey/weight-tracker
# -*- coding: utf-8 -*- from flask import Flask from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config.read('config/conf...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config....
<commit_before># -*- coding: utf-8 -*- from flask import Flask from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config.re...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config....
# -*- coding: utf-8 -*- from flask import Flask from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config.read('config/conf...
<commit_before># -*- coding: utf-8 -*- from flask import Flask from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' # App Config config = configparser.ConfigParser() config.re...
01b511b1f337f00eb72530692eec202611599c5a
tilequeue/queue/file.py
tilequeue/queue/file.py
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
Fix a bug in OutputFileQueue.close().
Fix a bug in OutputFileQueue.close(). tilequeue/queue/file.py -01a8fcb made `OutputFileQueue.read()` use `readline()` instead of `next()`, but didn't update `OutputFileQueue.close()`, which uses a list comprehension to grab the rest of the file. Since `.read()` no longer uses the iteration protocol, `.close()` wil...
Python
mit
mapzen/tilequeue,tilezen/tilequeue
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
<commit_before>from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coor...
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) ...
<commit_before>from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coor...
7e8623f750abb9d5d46be25ca184ab0036e7a572
runapp.py
runapp.py
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Set the host to use all IPs when runap is used
Set the host to use all IPs when runap is used
Python
apache-2.0
oldarmyc/anchor,oldarmyc/anchor,oldarmyc/anchor
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
<commit_before># Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
<commit_before># Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
8d02d9cf5e07951a80bf424334ba59af92cfd6cc
test/suite/out/long_lines.py
test/suite/out/long_lines.py
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + \ array[0] + ' '
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + array[0] + ' '
Update due to logical line changes
Update due to logical line changes
Python
mit
vauxoo-dev/autopep8,SG345/autopep8,MeteorAdminz/autopep8,Vauxoo/autopep8,SG345/autopep8,hhatto/autopep8,Vauxoo/autopep8,MeteorAdminz/autopep8,hhatto/autopep8,vauxoo-dev/autopep8
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + \ array[0] + ' ' Update due to logica...
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + array[0] + ' '
<commit_before>if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + \ array[0] + ' ' <comm...
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + array[0] + ' '
if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + \ array[0] + ' ' Update due to logica...
<commit_before>if True: if True: if True: self.__heap.sort( ) # pylint: builtin sort probably faster than O(n)-time heapify if True: foo = '( ' + \ array[0] + ' ' <comm...
45c7e910f13a43427359801782eef7ce537d6f5f
delayed_assert/__init__.py
delayed_assert/__init__.py
from delayed_assert.delayed_assert import expect, assert_expectations
import sys if sys.version_info > (3, 0): # Python 3 and above from delayed_assert.delayed_assert import expect, assert_expectations else: # for Python 2 from delayed_assert import expect, assert_expectations
Support for python 2 and 3
Support for python 2 and 3
Python
unlicense
pr4bh4sh/python-delayed-assert
from delayed_assert.delayed_assert import expect, assert_expectationsSupport for python 2 and 3
import sys if sys.version_info > (3, 0): # Python 3 and above from delayed_assert.delayed_assert import expect, assert_expectations else: # for Python 2 from delayed_assert import expect, assert_expectations
<commit_before>from delayed_assert.delayed_assert import expect, assert_expectations<commit_msg>Support for python 2 and 3<commit_after>
import sys if sys.version_info > (3, 0): # Python 3 and above from delayed_assert.delayed_assert import expect, assert_expectations else: # for Python 2 from delayed_assert import expect, assert_expectations
from delayed_assert.delayed_assert import expect, assert_expectationsSupport for python 2 and 3import sys if sys.version_info > (3, 0): # Python 3 and above from delayed_assert.delayed_assert import expect, assert_expectations else: # for Python 2 from delayed_assert import expect, assert_expectations
<commit_before>from delayed_assert.delayed_assert import expect, assert_expectations<commit_msg>Support for python 2 and 3<commit_after>import sys if sys.version_info > (3, 0): # Python 3 and above from delayed_assert.delayed_assert import expect, assert_expectations else: # for Python 2 from delayed_assert...
8154b206160cde249c474f5905a60b9a8086c910
conftest.py
conftest.py
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pytest import scipy import xarray import metpy.calc ...
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pooch import pytest import scipy import traitlets impo...
Print out all dependency versions at the start of pytest
TST: Print out all dependency versions at the start of pytest
Python
bsd-3-clause
Unidata/MetPy,dopplershift/MetPy,Unidata/MetPy,dopplershift/MetPy
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pytest import scipy import xarray import metpy.calc ...
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pooch import pytest import scipy import traitlets impo...
<commit_before># Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pytest import scipy import xarray impo...
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pooch import pytest import scipy import traitlets impo...
# Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pytest import scipy import xarray import metpy.calc ...
<commit_before># Copyright (c) 2016,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Configure pytest for metpy.""" import os import matplotlib import matplotlib.pyplot import numpy import pandas import pytest import scipy import xarray impo...
5f62f830d184c0f99b384f0653231dab52fbad50
conftest.py
conftest.py
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
Fix tests, broken by making slowfs a script
Fix tests, broken by making slowfs a script In the tests we must run the script using python so we run with the correct python from .tox/<env>/bin/python.
Python
bsd-2-clause
nirs/slowfs
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
<commit_before>import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with ...
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with a special __rea...
<commit_before>import logging import os import signal import subprocess import time import pytest log = logging.getLogger("test") logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(name)s] %(message)s') @pytest.fixture def basedir(tmpdir): # 1. Create real file system with ...
f7fa8b72b8d8d1b7bfcd6c738520fc87cd20e320
ixdjango/tests/__init__.py
ixdjango/tests/__init__.py
""" Hook into the test runner """ import subprocess from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class TestRunner(DjangoTestSuiteRunner): """ Place where we hook into DjangoTestSuiteRunner """ def setu...
""" Hook into the test runner """ import subprocess try: from django.test.runner import DiscoverRunner as BaseTestRunner except ImportError: from django.test.simple import DjangoTestSuiteRunner as BaseTestRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class ...
Use DiscoverRunner from Django 1.6 if available
Use DiscoverRunner from Django 1.6 if available
Python
mit
infoxchange/ixdjango
""" Hook into the test runner """ import subprocess from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class TestRunner(DjangoTestSuiteRunner): """ Place where we hook into DjangoTestSuiteRunner """ def setu...
""" Hook into the test runner """ import subprocess try: from django.test.runner import DiscoverRunner as BaseTestRunner except ImportError: from django.test.simple import DjangoTestSuiteRunner as BaseTestRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class ...
<commit_before>""" Hook into the test runner """ import subprocess from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class TestRunner(DjangoTestSuiteRunner): """ Place where we hook into DjangoTestSuiteRunner ""...
""" Hook into the test runner """ import subprocess try: from django.test.runner import DiscoverRunner as BaseTestRunner except ImportError: from django.test.simple import DjangoTestSuiteRunner as BaseTestRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class ...
""" Hook into the test runner """ import subprocess from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class TestRunner(DjangoTestSuiteRunner): """ Place where we hook into DjangoTestSuiteRunner """ def setu...
<commit_before>""" Hook into the test runner """ import subprocess from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from ixdjango.test_suite.utils import (CoreUtilsTests) class TestRunner(DjangoTestSuiteRunner): """ Place where we hook into DjangoTestSuiteRunner ""...
4241c6cbd9625c61a32ded5725e583da2b63a377
homedisplay/display/views.py
homedisplay/display/views.py
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
Use correct path for frame template
Use correct path for frame template
Python
bsd-3-clause
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): ...
ee03f3ae0d0501568cec87d8d4d7114441c19776
conftest.py
conftest.py
collect_ignore = ["setup.py"]
import tempfile import shutil import jedi collect_ignore = ["setup.py"] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `clean_jedi_cache` # has no effect during doctests. Without these hooks, doctests uses # user's cache (e.g., ~/.cache/je...
Use pytest_(un)configure to setup cache_directory
Use pytest_(un)configure to setup cache_directory
Python
mit
jonashaag/jedi,jonashaag/jedi,flurischt/jedi,WoLpH/jedi,tjwei/jedi,mfussenegger/jedi,mfussenegger/jedi,tjwei/jedi,dwillmer/jedi,WoLpH/jedi,flurischt/jedi,dwillmer/jedi
collect_ignore = ["setup.py"] Use pytest_(un)configure to setup cache_directory
import tempfile import shutil import jedi collect_ignore = ["setup.py"] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `clean_jedi_cache` # has no effect during doctests. Without these hooks, doctests uses # user's cache (e.g., ~/.cache/je...
<commit_before>collect_ignore = ["setup.py"] <commit_msg>Use pytest_(un)configure to setup cache_directory<commit_after>
import tempfile import shutil import jedi collect_ignore = ["setup.py"] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `clean_jedi_cache` # has no effect during doctests. Without these hooks, doctests uses # user's cache (e.g., ~/.cache/je...
collect_ignore = ["setup.py"] Use pytest_(un)configure to setup cache_directoryimport tempfile import shutil import jedi collect_ignore = ["setup.py"] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `clean_jedi_cache` # has no effect during ...
<commit_before>collect_ignore = ["setup.py"] <commit_msg>Use pytest_(un)configure to setup cache_directory<commit_after>import tempfile import shutil import jedi collect_ignore = ["setup.py"] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `...
62ad2eb82c037350f25d3e575e59f16740365159
pies/ast.py
pies/ast.py
from __future__ import absolute_import from ast import * from .version_info import PY2 if PY2: Try = TryExcept def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_only_argument_names(node): return [] def kw_only_default_count...
from __future__ import absolute_import import sys from ast import * from .version_info import PY2 if PY2 or sys.version_info[1] <= 2: Try = TryExcept else: TryFinally = () if PY2: def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_on...
Fix small incompatibility with Python 3.2
Fix small incompatibility with Python 3.2
Python
mit
lisongmin/pies,AbsoluteMSTR/pies,timothycrosley/pies,AbsoluteMSTR/pies,timothycrosley/pies,lisongmin/pies
from __future__ import absolute_import from ast import * from .version_info import PY2 if PY2: Try = TryExcept def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_only_argument_names(node): return [] def kw_only_default_count...
from __future__ import absolute_import import sys from ast import * from .version_info import PY2 if PY2 or sys.version_info[1] <= 2: Try = TryExcept else: TryFinally = () if PY2: def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_on...
<commit_before>from __future__ import absolute_import from ast import * from .version_info import PY2 if PY2: Try = TryExcept def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_only_argument_names(node): return [] def kw_onl...
from __future__ import absolute_import import sys from ast import * from .version_info import PY2 if PY2 or sys.version_info[1] <= 2: Try = TryExcept else: TryFinally = () if PY2: def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_on...
from __future__ import absolute_import from ast import * from .version_info import PY2 if PY2: Try = TryExcept def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_only_argument_names(node): return [] def kw_only_default_count...
<commit_before>from __future__ import absolute_import from ast import * from .version_info import PY2 if PY2: Try = TryExcept def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] def kw_only_argument_names(node): return [] def kw_onl...
5cbf2988e9064a49e2d745694c8233513be63a0b
openings_mover.py
openings_mover.py
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
Use preserved games for opening move selection
Use preserved games for opening move selection
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
<commit_before>import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() ...
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() max_rating_f...
<commit_before>import random import pdb from defines import * class OpeningsMover(object): def __init__(self, o_mgr, game): self.o_mgr = o_mgr self.game = game def get_a_good_move(self): wins = 0 losses = 0 totals = [] colour = self.game.to_move_colour() ...
99bcbd8795f3e2b1a10ac8fa81dd69d1cad7c022
yunity/api/serializers.py
yunity/api/serializers.py
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
Allow empty conversations to be serialized
Allow empty conversations to be serialized A conversation may exist without any content. The serializer then returns an empty message value.
Python
agpl-3.0
yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
<commit_before>def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, ...
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, 'name': model....
<commit_before>def user(model): if not model.is_authenticated(): return {} return { 'id': model.id, 'display_name': model.display_name, 'first_name': model.first_name, 'last_name': model.last_name, } def category(model): return { 'id': model.id, ...
d6f2b132844d1923932447c0ce67c581f723f433
wagtail/wagtailadmin/menu.py
wagtail/wagtailadmin/menu.py
from __future__ import unicode_literals from six import text_type from django.utils.text import slugify from django.utils.html import format_html class MenuItem(object): def __init__(self, label, url, name=None, classnames='', order=1000): self.label = label self.url = url self.classname...
from __future__ import unicode_literals from six import text_type try: # renamed util -> utils in Django 1.7; try the new name first from django.forms.utils import flatatt except ImportError: from django.forms.util import flatatt from django.utils.text import slugify from django.utils.html import format_...
Support passing html attributes into MenuItem
Support passing html attributes into MenuItem
Python
bsd-3-clause
JoshBarr/wagtail,m-sanders/wagtail,hamsterbacke23/wagtail,benemery/wagtail,jordij/wagtail,nutztherookie/wagtail,mixxorz/wagtail,nutztherookie/wagtail,dresiu/wagtail,serzans/wagtail,mixxorz/wagtail,bjesus/wagtail,nrsimha/wagtail,nilnvoid/wagtail,inonit/wagtail,torchbox/wagtail,wagtail/wagtail,dresiu/wagtail,davecranwell...
from __future__ import unicode_literals from six import text_type from django.utils.text import slugify from django.utils.html import format_html class MenuItem(object): def __init__(self, label, url, name=None, classnames='', order=1000): self.label = label self.url = url self.classname...
from __future__ import unicode_literals from six import text_type try: # renamed util -> utils in Django 1.7; try the new name first from django.forms.utils import flatatt except ImportError: from django.forms.util import flatatt from django.utils.text import slugify from django.utils.html import format_...
<commit_before>from __future__ import unicode_literals from six import text_type from django.utils.text import slugify from django.utils.html import format_html class MenuItem(object): def __init__(self, label, url, name=None, classnames='', order=1000): self.label = label self.url = url ...
from __future__ import unicode_literals from six import text_type try: # renamed util -> utils in Django 1.7; try the new name first from django.forms.utils import flatatt except ImportError: from django.forms.util import flatatt from django.utils.text import slugify from django.utils.html import format_...
from __future__ import unicode_literals from six import text_type from django.utils.text import slugify from django.utils.html import format_html class MenuItem(object): def __init__(self, label, url, name=None, classnames='', order=1000): self.label = label self.url = url self.classname...
<commit_before>from __future__ import unicode_literals from six import text_type from django.utils.text import slugify from django.utils.html import format_html class MenuItem(object): def __init__(self, label, url, name=None, classnames='', order=1000): self.label = label self.url = url ...
a056c630a197a070e55cce9f76124d56ba781e52
app/views/main.py
app/views/main.py
from flask import Blueprint, render_template from flask_login import login_required main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): return render_template("login.html")
from flask import Blueprint, render_template, g, redirect, url_for from flask_login import login_required, current_user, logout_user main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): if g.user.is_auth...
Add logout and auth checks
Add logout and auth checks
Python
mit
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
from flask import Blueprint, render_template from flask_login import login_required main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): return render_template("login.html")Add logout and auth checks
from flask import Blueprint, render_template, g, redirect, url_for from flask_login import login_required, current_user, logout_user main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): if g.user.is_auth...
<commit_before>from flask import Blueprint, render_template from flask_login import login_required main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): return render_template("login.html")<commit_msg>Add...
from flask import Blueprint, render_template, g, redirect, url_for from flask_login import login_required, current_user, logout_user main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): if g.user.is_auth...
from flask import Blueprint, render_template from flask_login import login_required main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): return render_template("login.html")Add logout and auth checksfrom...
<commit_before>from flask import Blueprint, render_template from flask_login import login_required main = Blueprint("main", __name__) @main.route("/") @main.route("/index") @login_required def index(): return "Logged in" @main.route("/login") def login(): return render_template("login.html")<commit_msg>Add...
9c07f8fdb9c955f49cf6ff92a25b1c0629157811
assembler6502.py
assembler6502.py
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode) #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = """ ; sample code beginning: sty $44,X """ for line in code.split...
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode + "\n") #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = sys.stdin.read() for line in code.split("\n"): hexcodes = ...
Use stdin for assembler input
Use stdin for assembler input
Python
mit
technetia/project-tdm,technetia/project-tdm,technetia/project-tdm
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode) #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = """ ; sample code beginning: sty $44,X """ for line in code.split...
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode + "\n") #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = sys.stdin.read() for line in code.split("\n"): hexcodes = ...
<commit_before>#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode) #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = """ ; sample code beginning: sty $44,X """ for lin...
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode + "\n") #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = sys.stdin.read() for line in code.split("\n"): hexcodes = ...
#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode) #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = """ ; sample code beginning: sty $44,X """ for line in code.split...
<commit_before>#! /usr/bin/env python import sys import assembler6502_tokenizer as tokenizer import assembler6502_parser as parser def output_byte(hexcode): sys.stdout.write(hexcode) #sys.stdout.write(chr(int(hexcode, 16))) def main(): code = """ ; sample code beginning: sty $44,X """ for lin...
358df6514b19424d5576d7a0a74ea15d71a3565b
canaryd/subprocess.py
canaryd/subprocess.py
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
Fix for python2.6: decode doesn't take keyword arguments.
Fix for python2.6: decode doesn't take keyword arguments.
Python
mit
Oxygem/canaryd,Oxygem/canaryd
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
<commit_before>import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.sub...
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.subprocess32 impor...
<commit_before>import os import shlex import sys from canaryd_packages import six # Not ideal but using the vendored in (to requests) chardet package from canaryd_packages.requests.packages import chardet from canaryd.log import logger if os.name == 'posix' and sys.version_info[0] < 3: from canaryd_packages.sub...