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
a31a3a9fd5f9f26bc9e06b7c682a9544f71806ad
tests/basics/dict_fromkeys.py
tests/basics/dict_fromkeys.py
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l)
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) # argument to fromkeys is a generator d = dict.fromkeys(i + 1 for i in range(1)) print(d)
Add test for dict.fromkeys where arg is a generator.
tests/basics: Add test for dict.fromkeys where arg is a generator. Improves coverage because it tests the case where the arg does not have a __len__ slot.
Python
mit
AriZuu/micropython,toolmacher/micropython,deshipu/micropython,infinnovation/micropython,swegener/micropython,adafruit/micropython,adafruit/micropython,TDAbboud/micropython,torwag/micropython,hiway/micropython,MrSurly/micropython,TDAbboud/micropython,trezor/micropython,cwyark/micropython,swegener/micropython,pozetroninc...
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) tests/basics: Add test for dict.fromkeys where arg is a generator. Improves coverage because it tests the case where the arg does not have a __len__ slot.
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) # argument to fromkeys is a generator d = dict.fromkeys(i + 1 for i in range(1)) print(d)
<commit_before>d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) <commit_msg>tests/basics: Add test for dict.fromkeys where arg is a generator. Improves coverage because it tests the case where the arg does not have a __len...
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) # argument to fromkeys is a generator d = dict.fromkeys(i + 1 for i in range(1)) print(d)
d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) tests/basics: Add test for dict.fromkeys where arg is a generator. Improves coverage because it tests the case where the arg does not have a __len__ slot.d = dict.fromkeys([...
<commit_before>d = dict.fromkeys([1, 2, 3, 4]) l = list(d.keys()) l.sort() print(l) d = dict.fromkeys([1, 2, 3, 4], 42) l = list(d.values()) l.sort() print(l) <commit_msg>tests/basics: Add test for dict.fromkeys where arg is a generator. Improves coverage because it tests the case where the arg does not have a __len...
9ee301c525600cfeb8b8ca3d59f75ff9b7823008
test/buildbot/buildbot_config/master/schedulers.py
test/buildbot/buildbot_config/master/schedulers.py
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler def get_schedulers(): # Run the unit tests for master master_unit = SingleBranchScheduler(name="f...
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import ( Dependent, SingleBranchScheduler) def get_schedulers(): # Run the unit tests for master master_unit = SingleB...
Make the acceptance tests dependent on the unit tests passing
Buildbot: Make the acceptance tests dependent on the unit tests passing
Python
mit
zsjohny/vagrant,bheuvel/vagrant,lonniev/vagrant,dharmab/vagrant,petems/vagrant,tjanez/vagrant,senglin/vagrant,benh57/vagrant,lonniev/vagrant,tomfanning/vagrant,cgvarela/vagrant,gpkfr/vagrant,krig/vagrant,philoserf/vagrant,philwrenn/vagrant,modulexcite/vagrant,tschortsch/vagrant,bmhatfield/vagrant,mitchellh/vagrant,tbar...
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler def get_schedulers(): # Run the unit tests for master master_unit = SingleBranchScheduler(name="f...
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import ( Dependent, SingleBranchScheduler) def get_schedulers(): # Run the unit tests for master master_unit = SingleB...
<commit_before>""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler def get_schedulers(): # Run the unit tests for master master_unit = SingleBranchSc...
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import ( Dependent, SingleBranchScheduler) def get_schedulers(): # Run the unit tests for master master_unit = SingleB...
""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler def get_schedulers(): # Run the unit tests for master master_unit = SingleBranchScheduler(name="f...
<commit_before>""" This module contains the logic which returns the set of schedulers to use for the build master. """ from buildbot.changes.filter import ChangeFilter from buildbot.schedulers.basic import SingleBranchScheduler def get_schedulers(): # Run the unit tests for master master_unit = SingleBranchSc...
727939269aef168513ad6d62913e20f0af95b4e6
dduplicated/hashs.py
dduplicated/hashs.py
import hashlib import os def get_hash(path): return get_md5(path) def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.read(4096) if not buffer: break hash_md5.update(buffer) return hash_md5.hexdigest()
import hashlib import os def get_hash(path): return get_md5(path) # MD5 methods is based on second answer from: https://exceptionshub.com/get-md5-hash-of-big-files-in-python.html def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.re...
Add reference to md5 method.
Add reference to md5 method.
Python
mit
messiasthi/dduplicated-cli
import hashlib import os def get_hash(path): return get_md5(path) def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.read(4096) if not buffer: break hash_md5.update(buffer) return hash_md5.hexdigest() Add refe...
import hashlib import os def get_hash(path): return get_md5(path) # MD5 methods is based on second answer from: https://exceptionshub.com/get-md5-hash-of-big-files-in-python.html def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.re...
<commit_before>import hashlib import os def get_hash(path): return get_md5(path) def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.read(4096) if not buffer: break hash_md5.update(buffer) return hash_md5.hexdi...
import hashlib import os def get_hash(path): return get_md5(path) # MD5 methods is based on second answer from: https://exceptionshub.com/get-md5-hash-of-big-files-in-python.html def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.re...
import hashlib import os def get_hash(path): return get_md5(path) def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.read(4096) if not buffer: break hash_md5.update(buffer) return hash_md5.hexdigest() Add refe...
<commit_before>import hashlib import os def get_hash(path): return get_md5(path) def get_md5(path): hash_md5 = hashlib.md5() if os.path.isfile(path): with open(path, "rb") as file: while True: buffer = file.read(4096) if not buffer: break hash_md5.update(buffer) return hash_md5.hexdi...
9cc3cf8a2911fedce7f08d2412388154c24a9ed1
engine.py
engine.py
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
Add Piece() to serve as the parent class for all chess pieces
Add Piece() to serve as the parent class for all chess pieces
Python
mit
EyuelAbebe/gamer,EyuelAbebe/gamer
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
<commit_before># Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): ...
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
# Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): x, y = algebrai...
<commit_before># Use x, y coords for unit positions # (97, 56) ... (104, 56) # ... ... # (97, 49) ... (104, 49) # # Algebraic notation for a position is: # algebraic_pos = chr(x) + chr(y) def _coord_to_algebraic(coord): x, y = coord return chr(x) + chr(y) def _algebraic_to_coord(algebraic): ...
3784b04109b2ca92633a788cc02562898064282c
factor.py
factor.py
import numpy as np def LU(A): m = A.shape[0] U = A.copy() L = np.eye( m ) for j in range(m): for i in range(j+1,m): L[i,j] = U[i,j]/U[j,j] U[i,:] -= L[i,j]*U[j,:] return L, U
import numpy as np def LU(A): r"""Factor a square matrix by Gaussian elimination. The argument A should be a square matrix (an m-by-m numpy array). The outputs L and U are also m-by-m. L is lower-triangular with unit diagonal entries and U is strictly upper-triangular. This impl...
Add docstring, with an example.
Add docstring, with an example.
Python
bsd-2-clause
ketch/rock-solid-code-demo
import numpy as np def LU(A): m = A.shape[0] U = A.copy() L = np.eye( m ) for j in range(m): for i in range(j+1,m): L[i,j] = U[i,j]/U[j,j] U[i,:] -= L[i,j]*U[j,:] return L, U Add docstring, with an example.
import numpy as np def LU(A): r"""Factor a square matrix by Gaussian elimination. The argument A should be a square matrix (an m-by-m numpy array). The outputs L and U are also m-by-m. L is lower-triangular with unit diagonal entries and U is strictly upper-triangular. This impl...
<commit_before>import numpy as np def LU(A): m = A.shape[0] U = A.copy() L = np.eye( m ) for j in range(m): for i in range(j+1,m): L[i,j] = U[i,j]/U[j,j] U[i,:] -= L[i,j]*U[j,:] return L, U <commit_msg>Add docstring, with an example.<commit_after>
import numpy as np def LU(A): r"""Factor a square matrix by Gaussian elimination. The argument A should be a square matrix (an m-by-m numpy array). The outputs L and U are also m-by-m. L is lower-triangular with unit diagonal entries and U is strictly upper-triangular. This impl...
import numpy as np def LU(A): m = A.shape[0] U = A.copy() L = np.eye( m ) for j in range(m): for i in range(j+1,m): L[i,j] = U[i,j]/U[j,j] U[i,:] -= L[i,j]*U[j,:] return L, U Add docstring, with an example.import numpy as np def LU(A): r"""Factor a square matr...
<commit_before>import numpy as np def LU(A): m = A.shape[0] U = A.copy() L = np.eye( m ) for j in range(m): for i in range(j+1,m): L[i,j] = U[i,j]/U[j,j] U[i,:] -= L[i,j]*U[j,:] return L, U <commit_msg>Add docstring, with an example.<commit_after>import numpy as np...
e26a49220835cd3df14820be7b400dc045092bb9
examples/load_ui_base_instance.py
examples/load_ui_base_instance.py
import sys import os os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith('__') and \ ...
import sys import os # Set preferred binding # os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith(...
Remove preffered binding, use obj.__class__ instead of type()
Remove preffered binding, use obj.__class__ instead of type()
Python
mit
mottosso/Qt.py,fredrikaverpil/Qt.py,mottosso/Qt.py,fredrikaverpil/Qt.py
import sys import os os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith('__') and \ ...
import sys import os # Set preferred binding # os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith(...
<commit_before>import sys import os os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith('__') and \ ...
import sys import os # Set preferred binding # os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith(...
import sys import os os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith('__') and \ ...
<commit_before>import sys import os os.environ["QT_PREFERRED_BINDING"] = "PySide" from Qt import QtWidgets, load_ui def setup_ui(uifile, base_instance=None): ui = load_ui(uifile) if not base_instance: return ui else: for member in dir(ui): if not member.startswith('__') and \ ...
07517c43b3d61431e8c7c40ea5e8b545b353bee4
imagersite/imagersite/urls.py
imagersite/imagersite/urls.py
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
Add static url to urlconf
Add static url to urlconf
Python
mit
jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
<commit_before>"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
<commit_before>"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
1975b33b5f251198b59a772a38b6302fbea89017
tests/test_create_template.py
tests/test_create_template.py
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
Extend test to check for the exit code and for an exception
Extend test to check for the exit code and for an exception
Python
mit
pytest-dev/cookiecutter-pytest-plugin
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
<commit_before># -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path....
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
# -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path.join(plugin, 't...
<commit_before># -*- coding: utf-8 -*- """ test_create_template -------------------- """ import os import pytest import subprocess def run_tox(plugin): """Run the tox suite of the newly created plugin.""" try: subprocess.check_call([ 'tox', plugin, '-c', os.path....
36213a31a1870cf38ec0ce3d208c6a2072e2b133
acapi/tests/test_client.py
acapi/tests/test_client.py
import os import requests import requests_mock import unittest from .. import Client @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" Set up the tests with the mock requests ...
import os import requests import requests_mock import unittest from .. import Client from ..exceptions import AcquiaCloudException @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" ...
Add test for failing to find credentials
Add test for failing to find credentials
Python
mit
skwashd/python-acquia-cloud
import os import requests import requests_mock import unittest from .. import Client @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" Set up the tests with the mock requests ...
import os import requests import requests_mock import unittest from .. import Client from ..exceptions import AcquiaCloudException @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" ...
<commit_before>import os import requests import requests_mock import unittest from .. import Client @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" Set up the tests with the...
import os import requests import requests_mock import unittest from .. import Client from ..exceptions import AcquiaCloudException @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" ...
import os import requests import requests_mock import unittest from .. import Client @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" Set up the tests with the mock requests ...
<commit_before>import os import requests import requests_mock import unittest from .. import Client @requests_mock.Mocker() class TestClient(unittest.TestCase): """Tests the Acquia Cloud API client class.""" req = None """ def setup(self, ): " "" Set up the tests with the...
ee24b8b57bc73947cd5140aca15389861b33ab00
gui/qt.py
gui/qt.py
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
Update Qt gui to have status bar and menu bar
Update Qt gui to have status bar and menu bar
Python
unlicense
CodingAnarchy/Amon
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
<commit_before>from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, ...
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, self).__init__(...
<commit_before>from lib.version import AMON_VERSION from lib.keybase import KeybaseUser from lib.gmail import GmailUser from lib.addresses import AddressBook import lib.gpg as gpg import sys import logging import json from PyQt4 import QtGui class Amon(QtGui.QMainWindow): def __init__(self): super(Amon, ...
6226d620078089b961fa2782d1bddb99534485ba
bin/system-info.py
bin/system-info.py
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%%" % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total / ...
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%% " % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total /...
Add space at left statusbar message
Add space at left statusbar message
Python
mit
emmit8/dotfiles,emmit8/dotfiles,emmit8/dotfiles,trippyroman/dotfiles,trippyroman/dotfiles,trippyroman/dotfiles
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%%" % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total / ...
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%% " % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total /...
<commit_before>#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%%" % ( str(int(mem.used / 1024 / 1024)), str(i...
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%% " % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total /...
#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%%" % ( str(int(mem.used / 1024 / 1024)), str(int(mem.total / ...
<commit_before>#!/usr/bin/env python """ System information for Tmux status line Author: Roman Belikin roman[dot]sstu[at]gmail.com """ import os import sys import psutil def info(): mem = psutil.virtual_memory() return "mem >> %s/%sMB cpu >> %s%%" % ( str(int(mem.used / 1024 / 1024)), str(i...
d5d2bff8ad68f6a3d743d9eb80b26d6d0bba4a0f
bluebottle/events/tasks.py
bluebottle/events/tasks.py
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
Check once every 15 minutes
Check once every 15 minutes
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
<commit_before>from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottl...
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottle') @periodic...
<commit_before>from celery.schedules import crontab from celery.task import periodic_task from django.utils.timezone import now from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant import logging from bluebottle.events.models import Event logger = logging.getLogger('bluebottl...
fb1a5f892e684143cd254447b5e1607a4b9e2c03
blaze/io/_printing/array_repr.py
blaze/io/_printing/array_repr.py
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): # TODO: create a mechanism for data descriptor to override # printing. if isinstance(a._data, RemoteDataDescriptor): body = 'Remot...
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): pre = 'array(' post = ',\n' + ' '*len(pre) + "dshape='" + str(a.dshape) + "'" + ')' # TODO: create a mechanism for data descriptor to override ...
Revert repr change, it looks worse for small example arrays
Revert repr change, it looks worse for small example arrays
Python
bsd-3-clause
xlhtc007/blaze,cowlicks/blaze,alexmojaki/blaze,FrancescAlted/blaze,maxalbert/blaze,mrocklin/blaze,dwillmer/blaze,ContinuumIO/blaze,nkhuyu/blaze,jdmcbr/blaze,jcrist/blaze,FrancescAlted/blaze,aterrel/blaze,AbhiAgarwal/blaze,AbhiAgarwal/blaze,alexmojaki/blaze,mwiebe/blaze,dwillmer/blaze,AbhiAgarwal/blaze,maxalbert/blaze,j...
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): # TODO: create a mechanism for data descriptor to override # printing. if isinstance(a._data, RemoteDataDescriptor): body = 'Remot...
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): pre = 'array(' post = ',\n' + ' '*len(pre) + "dshape='" + str(a.dshape) + "'" + ')' # TODO: create a mechanism for data descriptor to override ...
<commit_before>from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): # TODO: create a mechanism for data descriptor to override # printing. if isinstance(a._data, RemoteDataDescriptor): ...
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): pre = 'array(' post = ',\n' + ' '*len(pre) + "dshape='" + str(a.dshape) + "'" + ')' # TODO: create a mechanism for data descriptor to override ...
from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): # TODO: create a mechanism for data descriptor to override # printing. if isinstance(a._data, RemoteDataDescriptor): body = 'Remot...
<commit_before>from __future__ import absolute_import, division, print_function from . import _arrayprint from ...datadescriptor import RemoteDataDescriptor def array_repr(a): # TODO: create a mechanism for data descriptor to override # printing. if isinstance(a._data, RemoteDataDescriptor): ...
7dced29bcf8b2b5f5220f5dbfeaf631d9d5fc409
examples/backtest.py
examples/backtest.py
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
Comment to say using logging.CRITICAL is faster
Comment to say using logging.CRITICAL is faster
Python
mit
liampauling/flumine
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
<commit_before>import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger....
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger.JsonFormatter(c...
<commit_before>import time import logging from pythonjsonlogger import jsonlogger from flumine import FlumineBacktest, clients from strategies.lowestlayer import LowestLayer logger = logging.getLogger() custom_format = "%(asctime) %(levelname) %(message)" log_handler = logging.StreamHandler() formatter = jsonlogger....
245628bf53bf7255ccd5aa15d21ff8c1f5751ef8
examples/listdevs.py
examples/listdevs.py
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print str(device) if __name__ == '__main__': main()
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print 'ID %04x:%04x' % (device.getVendorID(), device.getProductID()), '->'.join(str(x) for x in ['Bus %03i' % (device.getBusNumber(), )] + device.getPortNumberList()), 'Dev...
Modify listdev to exercise getPortNumberList .
examples: Modify listdev to exercise getPortNumberList .
Python
lgpl-2.1
vpelletier/python-libusb1,vpelletier/python-libusb1
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print str(device) if __name__ == '__main__': main() examples: Modify listdev to exercise getPortNumberList .
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print 'ID %04x:%04x' % (device.getVendorID(), device.getProductID()), '->'.join(str(x) for x in ['Bus %03i' % (device.getBusNumber(), )] + device.getPortNumberList()), 'Dev...
<commit_before>#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print str(device) if __name__ == '__main__': main() <commit_msg>examples: Modify listdev to exercise getPortNumberList .<commit_after>
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print 'ID %04x:%04x' % (device.getVendorID(), device.getProductID()), '->'.join(str(x) for x in ['Bus %03i' % (device.getBusNumber(), )] + device.getPortNumberList()), 'Dev...
#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print str(device) if __name__ == '__main__': main() examples: Modify listdev to exercise getPortNumberList .#!/usr/bin/env python import usb1 def main(): context ...
<commit_before>#!/usr/bin/env python import usb1 def main(): context = usb1.USBContext() for device in context.getDeviceList(skip_on_error=True): print str(device) if __name__ == '__main__': main() <commit_msg>examples: Modify listdev to exercise getPortNumberList .<commit_after>#!/usr/bin/env pyt...
0668a4bba21e44a028cb008b03165f63eba5b457
acute/models.py
acute/models.py
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
Rename Clerking -> Seen by
Rename Clerking -> Seen by closes #1
Python
agpl-3.0
openhealthcare/acute,openhealthcare/acute,openhealthcare/acute
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
<commit_before>""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass...
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass class Treatmen...
<commit_before>""" acute models. """ from django.db.models import fields from opal import models class Demographics(models.Demographics): pass class Location(models.Location): pass class Allergies(models.Allergies): pass class Diagnosis(models.Diagnosis): pass class PastMedicalHistory(models.PastMedicalHistory): pass...
eb606f58b695dbb215b46cec3c895045e811bbad
scanpointgenerator/maskedgenerator.py
scanpointgenerator/maskedgenerator.py
class Factory(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point
class MaskedGenerator(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point
Rename Factory class to MaskedGenerator
Rename Factory class to MaskedGenerator
Python
apache-2.0
dls-controls/scanpointgenerator
class Factory(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point Rename Factory class to MaskedGenerator
class MaskedGenerator(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point
<commit_before> class Factory(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point <commit_msg>Rename Factory clas...
class MaskedGenerator(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point
class Factory(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point Rename Factory class to MaskedGenerator class...
<commit_before> class Factory(object): def __init__(self, generator, roi): self.generator = generator self.roi = roi def iterator(self): for point in self.generator.iterator(): if self.roi.contains_point(point): yield point <commit_msg>Rename Factory clas...
861d4f9773193a03d1f53c6e0c3f78d48b096d45
juliet_importer.py
juliet_importer.py
import os class loader: modules = {}; def __init__(self): self.load_modules(); def load_modules(self, path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path); pwd = os.getcwd(); os.chdir(path); for name in names:...
import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) name = name.split('.')[0] ...
Remove superfluous class from importer
Remove superfluous class from importer
Python
bsd-2-clause
halfbro/juliet
import os class loader: modules = {}; def __init__(self): self.load_modules(); def load_modules(self, path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path); pwd = os.getcwd(); os.chdir(path); for name in names:...
import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) name = name.split('.')[0] ...
<commit_before>import os class loader: modules = {}; def __init__(self): self.load_modules(); def load_modules(self, path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path); pwd = os.getcwd(); os.chdir(path); for...
import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) name = name.split('.')[0] ...
import os class loader: modules = {}; def __init__(self): self.load_modules(); def load_modules(self, path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path); pwd = os.getcwd(); os.chdir(path); for name in names:...
<commit_before>import os class loader: modules = {}; def __init__(self): self.load_modules(); def load_modules(self, path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path); pwd = os.getcwd(); os.chdir(path); for...
99592279585c27ad2c41f50d49c1e3264173eae6
actions/actions.py
actions/actions.py
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the Ceilometer services. @raises Exception should the service fail to stop. """ pause_un...
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the hacluster services. @raises Exception should the service fail to stop. """ pause_uni...
Fix copy and pasta error
Fix copy and pasta error
Python
apache-2.0
CanonicalBootStack/charm-hacluster,CanonicalBootStack/charm-hacluster,CanonicalBootStack/charm-hacluster
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the Ceilometer services. @raises Exception should the service fail to stop. """ pause_un...
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the hacluster services. @raises Exception should the service fail to stop. """ pause_uni...
<commit_before>#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the Ceilometer services. @raises Exception should the service fail to stop. "...
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the hacluster services. @raises Exception should the service fail to stop. """ pause_uni...
#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the Ceilometer services. @raises Exception should the service fail to stop. """ pause_un...
<commit_before>#!/usr/bin/python import sys import os sys.path.append('hooks/') import subprocess from charmhelpers.core.hookenv import action_fail from utils import ( pause_unit, resume_unit, ) def pause(args): """Pause the Ceilometer services. @raises Exception should the service fail to stop. "...
16945303e5092bbd37f914ea10936d95e054f703
harvesting_blog_data.py
harvesting_blog_data.py
import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) b...
# -*- coding: UTF-8 -*- import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_po...
Add G1 example and utf-8
Add G1 example and utf-8
Python
apache-2.0
fabriciojoc/redes-sociais-web,fabriciojoc/redes-sociais-web
import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) b...
# -*- coding: UTF-8 -*- import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_po...
<commit_before>import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp...
# -*- coding: UTF-8 -*- import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_po...
import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) b...
<commit_before>import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp...
bb045a6be1deacb1ee1c0e8746079ae77ec906f0
admin/base/wsgi.py
admin/base/wsgi.py
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
Patch psycopg correctly in admin
Patch psycopg correctly in admin [skip ci]
Python
apache-2.0
caseyrollins/osf.io,mattclark/osf.io,Nesiehr/osf.io,acshi/osf.io,laurenrevere/osf.io,pattisdr/osf.io,cwisecarver/osf.io,acshi/osf.io,felliott/osf.io,felliott/osf.io,adlius/osf.io,pattisdr/osf.io,Nesiehr/osf.io,erinspace/osf.io,cslzchen/osf.io,chennan47/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,felliott/osf.io,Joh...
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
<commit_before>""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey...
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey monkey.pat...
<commit_before>""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings if not settings.DEBUG_MODE: from gevent import monkey...
9c2951d794bb27952606cae77da1ebcd0d651e72
aiodownload/api.py
aiodownload/api.py
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
Fix - needed to provide create_task a function, not a class
Fix - needed to provide create_task a function, not a class
Python
mit
jelloslinger/aiodownload
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
<commit_before># -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=N...
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
# -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=None, download=N...
<commit_before># -*- coding: utf-8 -*- from aiodownload import AioDownloadBundle, AioDownload import asyncio def one(url, download=None): return [s for s in swarm([url], download=download)][0] def swarm(urls, download=None): return [e for e in each(urls, download=download)] def each(iterable, url_map=N...
633f84411e26201233e3c68c584b236363f79f62
server/conf/vhosts/available/token.py
server/conf/vhosts/available/token.py
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
Allow access to root leaves.
Allow access to root leaves.
Python
mit
slaff/attachix,slaff/attachix,slaff/attachix
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
<commit_before>import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): ...
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): host = ['lo...
<commit_before>import core.provider.authentication as authentication import core.notify.dispatcher as notify import core.notify.plugins.available.changes as changes import core.provider.storage as storage import core.resource.base as resource import conf.vhosts.available.default as default class VHost(default.VHost): ...
7da1326848cba8ff7bf61dde4583a12e5bad8ae2
centinel/backend.py
centinel/backend.py
import requests import config def get_recommended_versions(): return request("/versions") def get_experiments(): return request("/experiments") def get_results(): return request("/results") def get_clients(): return request("/clients") def request(slug): url = "%s%s" % (config.server_url, slug)...
import requests import config def request(slug): url = "%s%s" % (config.server_url, slug) req = requests.get(url) if req.status_code != requests.codes.ok: raise req.raise_for_status() return req.json() def get_recommended_versions(): return request("/versions") def get_experiments(): ...
Raise exception if status code is not ok
Raise exception if status code is not ok
Python
mit
JASONews/centinel,iclab/centinel,lianke123321/centinel,lianke123321/centinel,Ashish1805/centinel,rpanah/centinel,rpanah/centinel,ben-jones/centinel,iclab/centinel,lianke123321/centinel,iclab/centinel,rpanah/centinel
import requests import config def get_recommended_versions(): return request("/versions") def get_experiments(): return request("/experiments") def get_results(): return request("/results") def get_clients(): return request("/clients") def request(slug): url = "%s%s" % (config.server_url, slug)...
import requests import config def request(slug): url = "%s%s" % (config.server_url, slug) req = requests.get(url) if req.status_code != requests.codes.ok: raise req.raise_for_status() return req.json() def get_recommended_versions(): return request("/versions") def get_experiments(): ...
<commit_before>import requests import config def get_recommended_versions(): return request("/versions") def get_experiments(): return request("/experiments") def get_results(): return request("/results") def get_clients(): return request("/clients") def request(slug): url = "%s%s" % (config.se...
import requests import config def request(slug): url = "%s%s" % (config.server_url, slug) req = requests.get(url) if req.status_code != requests.codes.ok: raise req.raise_for_status() return req.json() def get_recommended_versions(): return request("/versions") def get_experiments(): ...
import requests import config def get_recommended_versions(): return request("/versions") def get_experiments(): return request("/experiments") def get_results(): return request("/results") def get_clients(): return request("/clients") def request(slug): url = "%s%s" % (config.server_url, slug)...
<commit_before>import requests import config def get_recommended_versions(): return request("/versions") def get_experiments(): return request("/experiments") def get_results(): return request("/results") def get_clients(): return request("/clients") def request(slug): url = "%s%s" % (config.se...
5225392a305e8e83a5a0fae91d3c2090914f2e5c
resolwe/flow/executors/docker.py
resolwe/flow/executors/docker.py
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): contain...
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import random import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): ...
Set random container name for tests
Set random container name for tests
Python
apache-2.0
jberci/resolwe,jberci/resolwe,genialis/resolwe,genialis/resolwe
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): contain...
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import random import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): ...
<commit_before>"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): ...
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import random import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): ...
"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): contain...
<commit_before>"""Local workflow executor""" from __future__ import absolute_import, division, print_function, unicode_literals import os import shlex import subprocess from django.conf import settings from .local import FlowExecutor as LocalFlowExecutor class FlowExecutor(LocalFlowExecutor): def start(self): ...
304a7da03072dbe6e099bbda37fb8aca0567e64b
organizer/models.py
organizer/models.py
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
Define Startup model related fields.
Ch03: Define Startup model related fields. [skip ci] https://docs.djangoproject.com/en/1.8/ref/models/fields/#manytomanyfield A many-to-many relationship allows for different models to be related to many of the other. For instance, students may take many classes, and classes are taught to many students. In our co...
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() ...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField(max_length=31) slug = models.SlugField() class Startup(models.Model): name = models.CharField(max_length=31) slug = models...
d0bea0fa49eb6c70f4c014d210fddf3a3a500ce6
ci/testsettings.py
ci/testsettings.py
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
Update travis-ci settings to use local backend with range queries
Update travis-ci settings to use local backend with range queries
Python
apache-2.0
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
<commit_before># This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression fo...
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression for tests that ch...
<commit_before># This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False # disable compression fo...
748e2e51a9ead7be4047e112aad2ed07a3d7a2c9
systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Check both ip and hosts when building dhcp bag
Check both ip and hosts when building dhcp bag
Python
apache-2.0
GabrielBrascher/cloudstack,resmo/cloudstack,resmo/cloudstack,resmo/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,wido/cloudstack,DaanHoogland/cloudstack,wido/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,wido/cloudstac...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
855724c4e52a55d141e2ef72cf7181710fb33d44
dwitter/user/urls.py
dwitter/user/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>[a-z0-9]*)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>[a-z0-9]*)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>\w+)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>\w+)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ]
Fix error when usernames have capital characters
Fix error when usernames have capital characters
Python
apache-2.0
lionleaf/dwitter,lionleaf/dwitter,lionleaf/dwitter
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>[a-z0-9]*)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>[a-z0-9]*)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ] Fix error when usernames have capital charac...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>\w+)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>\w+)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ]
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>[a-z0-9]*)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>[a-z0-9]*)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ] <commit_msg>Fix error when us...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>\w+)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>\w+)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>[a-z0-9]*)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>[a-z0-9]*)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ] Fix error when usernames have capital charac...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<url_username>[a-z0-9]*)$', views.user_feed, {'page_nr':'1'}, name='user_feed'), url(r'^(?P<url_username>[a-z0-9]*)/(?P<page_nr>\d+)$', views.user_feed, name='user_feed_page'), ] <commit_msg>Fix error when us...
fccc3be65ee5b82c8ac4f4810193ecaa7c6aed6c
backend/unichat/helpers.py
backend/unichat/helpers.py
from .models import School, User import re from django.contrib.auth.models import User as Django_User from django.contrib.auth.hashers import make_password def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id schoo...
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
Change create_user helper with new User model
Change create_user helper with new User model
Python
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
from .models import School, User import re from django.contrib.auth.models import User as Django_User from django.contrib.auth.hashers import make_password def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id schoo...
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
<commit_before>from .models import School, User import re from django.contrib.auth.models import User as Django_User from django.contrib.auth.hashers import make_password def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.i...
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
from .models import School, User import re from django.contrib.auth.models import User as Django_User from django.contrib.auth.hashers import make_password def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id schoo...
<commit_before>from .models import School, User import re from django.contrib.auth.models import User as Django_User from django.contrib.auth.hashers import make_password def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.i...
2a72b26f63c81e3ceb64d8fd920f3a1327aa0e13
cookiecutter/vcs.py
cookiecutter/vcs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
Use subprocess instead of os.system to git clone.
Use subprocess instead of os.system to git clone.
Python
bsd-3-clause
atlassian/cookiecutter,benthomasson/cookiecutter,luzfcb/cookiecutter,drgarcia1986/cookiecutter,moi65/cookiecutter,alex/cookiecutter,tylerdave/cookiecutter,drgarcia1986/cookiecutter,Vauxoo/cookiecutter,cguardia/cookiecutter,vintasoftware/cookiecutter,cichm/cookiecutter,agconti/cookiecutter,lgp171188/cookiecutter,nhomar/...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clone a git repo t...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.vcs ---------------- Helper functions for working with version control systems. """ import logging import os import shutil import subprocess import sys from .prompt import query_yes_no def git_clone(repo, checkout=None): """ Clo...
93a7616d949494888f5357f5491aa3278e7de234
cupy/logic/truth.py
cupy/logic/truth.py
import cupy def all(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.all(axis=axis, out=out, keepdims=keepdims) def any(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.any(axis=axis, out=out, keepdims=keepdims)
import cupy def all(a, axis=None, out=None, keepdims=False): """Tests whether all array elements along a given axis evaluate to True. Args: a (cupy.ndarray): Input array. axis (int or tuple of ints): Along which axis to compute all. The flattened array is used by default. ...
Add documents of cupy.all and cupy.any function
Add documents of cupy.all and cupy.any function
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
import cupy def all(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.all(axis=axis, out=out, keepdims=keepdims) def any(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.any(axis=axis, out=out, keepdims=keepdims) Add documents of...
import cupy def all(a, axis=None, out=None, keepdims=False): """Tests whether all array elements along a given axis evaluate to True. Args: a (cupy.ndarray): Input array. axis (int or tuple of ints): Along which axis to compute all. The flattened array is used by default. ...
<commit_before>import cupy def all(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.all(axis=axis, out=out, keepdims=keepdims) def any(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.any(axis=axis, out=out, keepdims=keepdims) <...
import cupy def all(a, axis=None, out=None, keepdims=False): """Tests whether all array elements along a given axis evaluate to True. Args: a (cupy.ndarray): Input array. axis (int or tuple of ints): Along which axis to compute all. The flattened array is used by default. ...
import cupy def all(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.all(axis=axis, out=out, keepdims=keepdims) def any(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.any(axis=axis, out=out, keepdims=keepdims) Add documents of...
<commit_before>import cupy def all(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.all(axis=axis, out=out, keepdims=keepdims) def any(a, axis=None, out=None, keepdims=False): assert isinstance(a, cupy.ndarray) return a.any(axis=axis, out=out, keepdims=keepdims) <...
4785a5e8d639dea1a9cf767d2c77f6bd9dbe2433
leapp/cli/upgrade/__init__.py
leapp/cli/upgrade/__init__.py
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
Add back missing manager creation
leapp: Add back missing manager creation
Python
lgpl-2.1
leapp-to/prototype,vinzenz/prototype,leapp-to/prototype,vinzenz/prototype,vinzenz/prototype,leapp-to/prototype,vinzenz/prototype,leapp-to/prototype
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
<commit_before>from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name):...
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name): repo_p...
<commit_before>from leapp.utils.clicmd import command, command_opt from leapp.repository.scan import find_and_scan_repositories from leapp.config import get_config from leapp.logger import configure_logger def load_repositories_from(name, repo_path, manager=None): if get_config().has_option('repositories', name):...
8993ad7d2b15d05e26788c9bf39ed81794f724dc
branchconfig.py
branchconfig.py
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
Convert branch to string explicitly
Convert branch to string explicitly
Python
apache-2.0
igoris/branch-config
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
<commit_before>#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add...
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add_argument("-o",...
<commit_before>#!/usr/bin/env python import argparse from git import Repo import configprocessor def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="Path to git working copy") parser.add_argument("-c", "--configfile", help="Configuration file to parse") parser.add...
6e1a211ff1834f8047261d51737afcb0412075b5
memleak.py
memleak.py
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
Add logging of memory use
Add logging of memory use
Python
mit
MaestroGraph/sparse-hyper
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
<commit_before>import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(...
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(2) B = 256 M =...
<commit_before>import torch from torch import FloatTensor, LongTensor from torch.autograd import Variable from torch import nn, optim from torch.nn import Parameter from tqdm import trange import util, logging, os, psutil import hyper logging.basicConfig(filename='memleak.log',level=logging.INFO) torch.manual_seed(...
badfa5c7c0572e36a94598ec6cc8a845e453d233
chipy_org/settings_test.py
chipy_org/settings_test.py
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
Add dev_utils to test settings
Add dev_utils to test settings
Python
mit
chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
<commit_before># pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_REC...
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
# pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_RECIPIENTS = [ ...
<commit_before># pylint: disable=unused-wildcard-import,wildcard-import from .settings import * DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST": {}}} DEBUG = True ADMINS = ["admin@chipy.org"] EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ENVELOPE_EMAIL_REC...
c1ab2795152d50de9f535e90b550d033feadf778
tests/test_storage.py
tests/test_storage.py
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
Fix case-sensitive filename in storage test
Fix case-sensitive filename in storage test
Python
mit
theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
<commit_before>import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage back...
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage backend""" set...
<commit_before>import json import os from mock import patch import pytest from inmemorystorage.storage import InMemoryStorage TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'images') @pytest.mark.django_db def test_alternate_storage(admin_client, settings): """Verify can plugin alternate storage back...
95d71d5a84f05de7d655fd788a4139c3a1316d74
text/__init__.py
text/__init__.py
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
Add function to generate a blob of text from a list of files
Add function to generate a blob of text from a list of files
Python
mit
IanLee1521/utilities
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
<commit_before>#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile...
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile(fname) ...
<commit_before>#! /usr/bin/env python import os def get_files(path, ext=None): """ Get all files in directory path, optionally with the specified extension """ if ext is None: ext = '' return [ os.path.abspath(fname) for fname in os.listdir(path) if os.path.isfile...
9891fa25d905bb2aa34c9c55fc420d29438f9499
leonardo_ckeditor/__init__.py
leonardo_ckeditor/__init__.py
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('uploads/', ('CKEditor upload directory')), 'CKEDIT...
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('', ('CKEditor upload directory')), 'CKEDITOR_CONFI...
Use upload widget in the default state.
Use upload widget in the default state.
Python
bsd-3-clause
leonardo-modules/leonardo-ckeditor,leonardo-modules/leonardo-ckeditor
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('uploads/', ('CKEditor upload directory')), 'CKEDIT...
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('', ('CKEditor upload directory')), 'CKEDITOR_CONFI...
<commit_before> from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('uploads/', ('CKEditor upload directory'...
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('', ('CKEditor upload directory')), 'CKEDITOR_CONFI...
from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('uploads/', ('CKEditor upload directory')), 'CKEDIT...
<commit_before> from django.apps import AppConfig from .ckeditor_config import DEFAULT_CONFIG default_app_config = 'leonardo_ckeditor.Config' LEONARDO_APPS = [ 'leonardo_ckeditor', 'ckeditor', 'ckeditor_uploader' ] LEONARDO_CONFIG = { 'CKEDITOR_UPLOAD_PATH': ('uploads/', ('CKEditor upload directory'...
038ea41054c3b7d07a7297d392e5e5d5f9c59d6a
logout.py
logout.py
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") cgitb.enable() # enable debugging header.showHeader() # content startTag("div", id="container") # start container dis...
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") print('<meta http-equiv="set-cookie" content="password="";>') cgitb.enable() # enable debugging header.showHeader() # ...
Fix inability to log out
Fix inability to log out
Python
apache-2.0
ISD-Sound-and-Lights/InventoryControl
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") cgitb.enable() # enable debugging header.showHeader() # content startTag("div", id="container") # start container dis...
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") print('<meta http-equiv="set-cookie" content="password="";>') cgitb.enable() # enable debugging header.showHeader() # ...
<commit_before>#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") cgitb.enable() # enable debugging header.showHeader() # content startTag("div", id="container") # star...
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") print('<meta http-equiv="set-cookie" content="password="";>') cgitb.enable() # enable debugging header.showHeader() # ...
#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") cgitb.enable() # enable debugging header.showHeader() # content startTag("div", id="container") # start container dis...
<commit_before>#!/usr/local/bin/python3 # ^^^ this is bad practice, DON'T do as I did! import cgitb # debugging import footer import header from htmlify import * print("Content-Type: text/html;charset=utf-8\n") cgitb.enable() # enable debugging header.showHeader() # content startTag("div", id="container") # star...
532bebd01822917f89ec18080bf8e5a75c16832d
config_template.py
config_template.py
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
Add churn entry in the file
Add churn entry in the file
Python
mit
nachoaguadoc/aimlx-demos,nachoaguadoc/aimlx-demos,nachoaguadoc/aimlx-demos
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
<commit_before>chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path'...
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path': '', 'pyth...
<commit_before>chatbot_ubuntu = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_swisscom = { 'path': '', 'model_id': '', 'python_env': '' } chatbot_ubuntu_seq2seq = { 'socket_address': '', 'socket_port': '' } ate = { 'path': '', 'python_env': '' } neuroate = { 'path'...
e4452ff7e8c27e2e8315c2edb8627a2e92ca86e3
panoptes_cli/scripts/panoptes.py
panoptes_cli/scripts/panoptes.py
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.join(os.environ['HOME'], '.panoptes') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.conf...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
Use os.path.expanduser to find config directory
Use os.path.expanduser to find config directory Works on Windows and Unix.
Python
apache-2.0
zooniverse/panoptes-cli
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.join(os.environ['HOME'], '.panoptes') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.conf...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
<commit_before>import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.join(os.environ['HOME'], '.panoptes') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.join(os.environ['HOME'], '.panoptes') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.conf...
<commit_before>import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.join(os.environ['HOME'], '.panoptes') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml...
57a477985f3591258dee8a5cbf4ba2a173c749fc
dashboard/views.py
dashboard/views.py
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
Fix dashboard bug when user is not in any teams.
Fix dashboard bug when user is not in any teams.
Python
apache-2.0
snswa/swsites,snswa/swsites,snswa/swsites
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
<commit_before>from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models im...
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models import Team @lo...
<commit_before>from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.shortcuts import render_to_response from django.template.context import RequestContext from actstream.models import Action from teams.models im...
7ebd46c4a698b642dd1da355e413eb1bc9ce2727
learntris.py
learntris.py
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
Update rest of functions with new data structure; Passes Test 8
Update rest of functions with new data structure; Passes Test 8
Python
mit
mosegontar/learntris
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
<commit_before>#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: r...
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: row = map(lambda...
<commit_before>#!/usr/bin/env python import sys class Grid(object): def __init__(self): self.board = [[None] * 10 for i in range(22)] self.score = 0 self.lines_clear = 0 def draw_board(self): current_board = self.board for row in current_board: r...
604102af89c0f3ab3b9562b3baa246f24de3fe90
locations/spiders/la_salsa.py
locations/spiders/la_salsa.py
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem import json import re class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&rad...
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&radius=99999999', )...
Use xpath instead of regex
Use xpath instead of regex
Python
mit
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem import json import re class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&rad...
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&radius=99999999', )...
<commit_before># -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem import json import re class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?...
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&radius=99999999', )...
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem import json import re class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?lat=0&lng=0&rad...
<commit_before># -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem import json import re class LaSalsaSpider(scrapy.Spider): name = "la_salsa" allowed_domains = ["www.lasalsa.com"] start_urls = ( 'http://lasalsa.com/wp-content/themes/lasalsa-main/locations-search.php?...
7588bab65a098cbc0b5e2ba2c1b9a45b08adfc46
fsspec/__init__.py
fsspec/__init__.py
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
Make the exceptions valid on fsspec module level
Make the exceptions valid on fsspec module level
Python
bsd-3-clause
intake/filesystem_spec,fsspec/filesystem_spec,fsspec/filesystem_spec
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
<commit_before>try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, ...
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, open_files, ope...
<commit_before>try: from importlib.metadata import entry_points except ImportError: # python < 3.8 try: from importlib_metadata import entry_points except ImportError: entry_points = None from . import caching from ._version import get_versions from .core import get_fs_token_paths, open, ...
c126950f653169ad3d5035ea1580a7c4c7250f22
test/test_Spectrum.py
test/test_Spectrum.py
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] spec = Spectrum(x, y) assert spec...
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] z = 2200*x spec = Spectrum.Spectr...
Fix test to pass, get class from module and add wavelength assignment
Fix test to pass, get class from module and add wavelength assignment
Python
mit
jason-neal/spectrum_overload,jason-neal/spectrum_overload,jason-neal/spectrum_overload
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] spec = Spectrum(x, y) assert spec...
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] z = 2200*x spec = Spectrum.Spectr...
<commit_before>#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] spec = Spectrum(x, y) ...
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] z = 2200*x spec = Spectrum.Spectr...
#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] spec = Spectrum(x, y) assert spec...
<commit_before>#!/usr/bin/env python3 from __future__ import division, print_function import pytest import sys # Add Spectrum location to path sys.path.append('../') import Spectrum # Test using hypothesis def test_spectrum_assigns_data(): x = [1,2,3,4,5,6] y = [1,1,0.9,0.95,1,1] spec = Spectrum(x, y) ...
1c01423e0cccd64ab249a9749f04cf3e155d3f53
setup.py
setup.py
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst') except(IOError, ImportError): long_description = ...
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst', 'markdown') except(IOError, ImportError): long_de...
Convert md to rst readme specially for PyPi
Convert md to rst readme specially for PyPi
Python
mit
sashgorokhov/argparse-autogen
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst') except(IOError, ImportError): long_description = ...
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst', 'markdown') except(IOError, ImportError): long_de...
<commit_before>from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst') except(IOError, ImportError): long...
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst', 'markdown') except(IOError, ImportError): long_de...
from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst') except(IOError, ImportError): long_description = ...
<commit_before>from distutils.core import setup with open('README.md') as readme: with open('HISTORY.md') as history: long_description = readme.read() + '\n\n' + history.read() try: import pypandoc long_description = pypandoc.convert(long_description, 'rst') except(IOError, ImportError): long...
7844aa93d4f6836fbb8bba3a0af6b2e0e17c6fde
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
Update dependencies for node and less
Update dependencies for node and less
Python
bsd-3-clause
tangentlabs/django-oscar-fancypages,tangentlabs/django-oscar-fancypages
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au", descript...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="sebastian.vetter@tangentsnowball.com.au...
3fd264c4927a11bb3915dee38a17b169ea801c63
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='1.0', a...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='0.1.0', ...
Drop verison to 0.1.0 for internal release
Drop verison to 0.1.0 for internal release
Python
apache-2.0
disqus/mule
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='1.0', a...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='0.1.0', ...
<commit_before>#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', versi...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='0.1.0', ...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', version='1.0', a...
<commit_before>#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os.path tests_require = [ 'redis', 'unittest2', ] setup( name='Mule', versi...
08335e060311994a897b95302fc54a0a2b196614
mdx_linkify/__init__.py
mdx_linkify/__init__.py
from mdx_linkify.mdx_linkify import makeExtension
import sys is_python3 = sys.version_info >= (3, 0) if is_python3: from mdx_linkify.mdx_linkify import makeExtension else: from mdx_linkify import makeExtension assert makeExtension # Silences pep8.
Fix import for python2 and pypy
Fix import for python2 and pypy
Python
mit
daGrevis/mdx_linkify
from mdx_linkify.mdx_linkify import makeExtension Fix import for python2 and pypy
import sys is_python3 = sys.version_info >= (3, 0) if is_python3: from mdx_linkify.mdx_linkify import makeExtension else: from mdx_linkify import makeExtension assert makeExtension # Silences pep8.
<commit_before>from mdx_linkify.mdx_linkify import makeExtension <commit_msg>Fix import for python2 and pypy<commit_after>
import sys is_python3 = sys.version_info >= (3, 0) if is_python3: from mdx_linkify.mdx_linkify import makeExtension else: from mdx_linkify import makeExtension assert makeExtension # Silences pep8.
from mdx_linkify.mdx_linkify import makeExtension Fix import for python2 and pypyimport sys is_python3 = sys.version_info >= (3, 0) if is_python3: from mdx_linkify.mdx_linkify import makeExtension else: from mdx_linkify import makeExtension assert makeExtension # Silences pep8.
<commit_before>from mdx_linkify.mdx_linkify import makeExtension <commit_msg>Fix import for python2 and pypy<commit_after>import sys is_python3 = sys.version_info >= (3, 0) if is_python3: from mdx_linkify.mdx_linkify import makeExtension else: from mdx_linkify import makeExtension assert makeExtension # S...
3f00fc50b0eba9516cfc92b2448df299a68b5524
main_test.py
main_test.py
fuckit('checktz') import asyncio import sys, os import fuckit myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!"
import asyncio import sys, os import fuckit fuckit('checktz') myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!"
Make the builds actually pass
Make the builds actually pass
Python
epl-1.0
Bentechy66/Interlaced-Minds-Bot
fuckit('checktz') import asyncio import sys, os import fuckit myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!" Make the builds actually pass
import asyncio import sys, os import fuckit fuckit('checktz') myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!"
<commit_before>fuckit('checktz') import asyncio import sys, os import fuckit myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!" <commit_msg>Make the builds actually pass<commit_after>
import asyncio import sys, os import fuckit fuckit('checktz') myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!"
fuckit('checktz') import asyncio import sys, os import fuckit myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!" Make the builds actually passimport asyncio import sys, os import fuckit fuckit('ch...
<commit_before>fuckit('checktz') import asyncio import sys, os import fuckit myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') def test_time(): assert checktz.GetTime("test") == "Finished with no errors!" <commit_msg>Make the builds actually pass<commit_after>import asynci...
ca917fa28c5bf8fe3c431868951f429c48b58e0a
buysafe/urls.py
buysafe/urls.py
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), (r'^start/$', 'start'), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), (r'^check/(?P<payment_typ...
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), url(r'^start/$', 'start', name="buysafe_start"), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), ...
Add view label to buysafe_start
Add view label to buysafe_start
Python
bsd-3-clause
uranusjr/django-buysafe
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), (r'^start/$', 'start'), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), (r'^check/(?P<payment_typ...
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), url(r'^start/$', 'start', name="buysafe_start"), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), ...
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), (r'^start/$', 'start'), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), (r'^check/...
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), url(r'^start/$', 'start', name="buysafe_start"), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), ...
from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), (r'^start/$', 'start'), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), (r'^check/(?P<payment_typ...
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns( 'buysafe.views', url(r'^entry/(?P<order_id>\d+)/$', 'entry', name='buysafe_pay'), (r'^start/$', 'start'), (r'^success/(?P<payment_type>[01])/$', 'success'), (r'^fail/(?P<payment_type>[01])/$', 'fail'), (r'^check/...
320981553f589d801d17b000d6f74c301f552811
survey/tests/test_default_settings.py
survey/tests/test_default_settings.py
from survey.tests import BaseTest from django.test import override_settings from django.conf import settings from survey import set_default_settings @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings.C...
from django.conf import settings from django.test import override_settings from survey import set_default_settings from survey.tests import BaseTest @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings....
Apply black following @gjelsas MR
Apply black following @gjelsas MR
Python
agpl-3.0
Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey
from survey.tests import BaseTest from django.test import override_settings from django.conf import settings from survey import set_default_settings @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings.C...
from django.conf import settings from django.test import override_settings from survey import set_default_settings from survey.tests import BaseTest @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings....
<commit_before>from survey.tests import BaseTest from django.test import override_settings from django.conf import settings from survey import set_default_settings @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" ...
from django.conf import settings from django.test import override_settings from survey import set_default_settings from survey.tests import BaseTest @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings....
from survey.tests import BaseTest from django.test import override_settings from django.conf import settings from survey import set_default_settings @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" del settings.C...
<commit_before>from survey.tests import BaseTest from django.test import override_settings from django.conf import settings from survey import set_default_settings @override_settings() class TestDefaultSettings(BaseTest): def test_set_choices_separator(self): url = "/admin/survey/survey/1/change/" ...
15030074c73f41a2a298c5de77b584875b7a5441
sympy/logic/benchmarks/run-solvers.py
sympy/logic/benchmarks/run-solvers.py
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} fo...
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.path.dirname(__file__) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} if __name__ == '__main__': for...
Make logic benchmarks runner more portable
Make logic benchmarks runner more portable
Python
bsd-3-clause
abloomston/sympy,wyom/sympy,madan96/sympy,sunny94/temp,liangjiaxing/sympy,kaichogami/sympy,Davidjohnwilson/sympy,shikil/sympy,AunShiLord/sympy,shipci/sympy,sahilshekhawat/sympy,pbrady/sympy,jaimahajan1997/sympy,MechCoder/sympy,Davidjohnwilson/sympy,mcdaniel67/sympy,atreyv/sympy,debugger22/sympy,madan96/sympy,sampadsaha...
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} fo...
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.path.dirname(__file__) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} if __name__ == '__main__': for...
<commit_before>from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] r...
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.path.dirname(__file__) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} if __name__ == '__main__': for...
from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] results = {} fo...
<commit_before>from __future__ import print_function, division from sympy.logic.utilities import load_file from sympy.logic import satisfiable import time import os import sys input_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]) INPUT = [5 * i for i in range(2, 16)] ALGORITHMS = ['dpll', 'dpll2'] r...
adfcd15e8c9f3c4b08bdb358d041401bf77d2a25
calicoctl/calico_ctl/__init__.py
calicoctl/calico_ctl/__init__.py
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.6.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.6.0" __libcalico_version__ = "v0.6.0" __felix_version__ = "1.2.1"
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.7.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.7.0" __libcalico_version__ = "v0.7.0" __felix_version__ = "1.3.0-pre5"
Fix release numbers to be latest values
Fix release numbers to be latest values
Python
apache-2.0
caseydavenport/calico-containers,Metaswitch/calico-docker,caseydavenport/calico-containers,projectcalico/calico-containers,quater/calico-containers,Metaswitch/calico-docker,insequent/calico-docker,projectcalico/calico-containers,TrimBiggs/calico-containers,tomdee/calico-docker,TrimBiggs/calico-docker,caseydavenport/cal...
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.6.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.6.0" __libcalico_version__ = "v0.6.0" __felix_version__ = "1.2.1" Fix release numbers to be latest values
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.7.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.7.0" __libcalico_version__ = "v0.7.0" __felix_version__ = "1.3.0-pre5"
<commit_before>__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.6.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.6.0" __libcalico_version__ = "v0.6.0" __felix_version__ = "1.2.1" <commit_msg>Fix release numbers to be latest values<commit_after>
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.7.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.7.0" __libcalico_version__ = "v0.7.0" __felix_version__ = "1.3.0-pre5"
__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.6.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.6.0" __libcalico_version__ = "v0.6.0" __felix_version__ = "1.2.1" Fix release numbers to be latest values__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.7.0" __rkt_plu...
<commit_before>__version__ = "0.13.0-dev" __kubernetes_plugin_version__ = "v0.6.0" __rkt_plugin_version__ = "v0.1.0" __libnetwork_plugin_version__ = "v0.6.0" __libcalico_version__ = "v0.6.0" __felix_version__ = "1.2.1" <commit_msg>Fix release numbers to be latest values<commit_after>__version__ = "0.13.0-dev" __kuberne...
2060a89cc008e3fc19b90b2278001350ef6b49ad
stellar/data/stellargraph.py
stellar/data/stellargraph.py
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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 ...
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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 ...
Split StellarGraph class into two: undirected and directed graph classes
Split StellarGraph class into two: undirected and directed graph classes
Python
apache-2.0
stellargraph/stellargraph,stellargraph/stellargraph
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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 ...
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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...
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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 ...
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2017-2018 Data61, CSIRO # # 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...
0f9d3b0ed9efc72b8b3fd4d466caa4517691546c
strategies/alexStrategies.py
strategies/alexStrategies.py
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
Add a simple card counting strategy
Add a simple card counting strategy
Python
mit
AlexMooney/pairsTournament
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
<commit_before>class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFol...
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFoldStrategy: ...
<commit_before>class FixFoldStrategy: """This strategy folds every time there is a small card available.""" def __init__(self, N=3): self.N = N def play(self, info): if info.bestFold(self.player)[1] > self.N: return 'Hit me' else: return 'fold' class RatioFol...
619462203f3369b807e14e4715f992c40224b37a
account_fiscal_position_no_source_tax/account.py
account_fiscal_position_no_source_tax/account.py
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
FIX fiscal position no source tax
FIX fiscal position no source tax
Python
agpl-3.0
csrocha/account_check,csrocha/account_check
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
<commit_before>from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id...
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id, taxes, contex...
<commit_before>from openerp import models, api, fields class account_fiscal_position(models.Model): _inherit = 'account.fiscal.position' @api.v7 def map_tax(self, cr, uid, fposition_id, taxes, context=None): result = super(account_fiscal_position, self).map_tax( cr, uid, fposition_id...
5c341fc463840bc2e237e1529a43aa5915a70c77
luhn/luhn.py
luhn/luhn.py
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
Return the remainder of checksum
Return the remainder of checksum
Python
mit
amalshehu/exercism-python
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
<commit_before># File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): ...
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
# File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): return [in...
<commit_before># File: luhn.py # Purpose: Write a program that can take a number and determine whether # or not it is valid per the Luhn formula. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 09:55 PM def Luhn(card_number): def digits_of(n): ...
7cf2d39f4822a50f4a9347ba6c82498abc8e9bb7
index/createIndex.py
index/createIndex.py
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
Remove type when creating index
Remove type when creating index
Python
mit
zpurcey/bestbuy-demo,zpurcey/bestbuy-demo,zpurcey/bestbuy-demo
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
<commit_before>#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: ...
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: jsonData ...
<commit_before>#!/usr/bin/python import requests import json import os myElasticServerIp = os.environ.get('ES_SERVER_IP', 'localhost') myIndexName = os.environ.get('ES_INDEX_NAME', 'bestbuy-products') def main(): deleteIndex() createIndex() def createIndex(): with open('mapping.json') as mappingFile: ...
c4d2e4c4f49db961dae59780fa8f5ec351a11353
projects/models.py
projects/models.py
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
Add incoming number for the project and attutude
Add incoming number for the project and attutude
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
<commit_before># -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), (...
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
# -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), ('rejected', u'Р...
<commit_before># -*- encoding:utf-8 -*- from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС'), (...
30a16da0089d0f7afa46fb129a6f426c75cbcd3b
modules/test_gitdata.py
modules/test_gitdata.py
from nose import with_setup from nose.tools import * import os import sys from gitdata import GitData import simplejson as json def test_fetch(): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loads(study_nexson) except...
import unittest import os import sys from gitdata import GitData import simplejson as json class TestGitData(unittest.TestCase): def test_fetch(self): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loa...
Convert GitData tests to a unittest suite
Convert GitData tests to a unittest suite
Python
bsd-2-clause
leto/new_opentree_api,leto/new_opentree_api
from nose import with_setup from nose.tools import * import os import sys from gitdata import GitData import simplejson as json def test_fetch(): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loads(study_nexson) except...
import unittest import os import sys from gitdata import GitData import simplejson as json class TestGitData(unittest.TestCase): def test_fetch(self): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loa...
<commit_before>from nose import with_setup from nose.tools import * import os import sys from gitdata import GitData import simplejson as json def test_fetch(): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loads(study_nex...
import unittest import os import sys from gitdata import GitData import simplejson as json class TestGitData(unittest.TestCase): def test_fetch(self): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loa...
from nose import with_setup from nose.tools import * import os import sys from gitdata import GitData import simplejson as json def test_fetch(): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loads(study_nexson) except...
<commit_before>from nose import with_setup from nose.tools import * import os import sys from gitdata import GitData import simplejson as json def test_fetch(): gd = GitData(repo="./treenexus") study_id = 438 study_nexson = gd.fetch_study(study_id) valid = 1 try: json.loads(study_nex...
9beb8378831f33c2256b5a7bf73f24d155122bea
nasa_data.py
nasa_data.py
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): return image_data = requests.get(...
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): raise TypeError image_data = requ...
Update 0.6.4 - Fixed exception error
Update 0.6.4 - Fixed exception error
Python
mit
FXelix/space_facts_bot
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): return image_data = requests.get(...
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): raise TypeError image_data = requ...
<commit_before> import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): return image_data ...
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): raise TypeError image_data = requ...
import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): return image_data = requests.get(...
<commit_before> import requests import os def get_apod(): os.makedirs("APODs", exist_ok=True) try: apod_data = requests.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY").json() image_url = apod_data["url"] if image_url.endswith(".gif"): return image_data ...
f35494ebc7c710af45c8973eb1c2b4d31ec1c7c0
tests/fakes.py
tests/fakes.py
class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self.body = body self.content_type = content_type self.status_code...
import six class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body if six.PY3: self.body = body.encode('utf-8') class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self...
Update tests to reproduce bug
Update tests to reproduce bug
Python
bsd-3-clause
pobear/restless,viniciuscainelli/restless,toastdriven/restless,tonybajan/restless,CraveFood/restkiss,jangeador/restless
class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self.body = body self.content_type = content_type self.status_code...
import six class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body if six.PY3: self.body = body.encode('utf-8') class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self...
<commit_before>class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self.body = body self.content_type = content_type s...
import six class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body if six.PY3: self.body = body.encode('utf-8') class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self...
class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self.body = body self.content_type = content_type self.status_code...
<commit_before>class FakeHttpRequest(object): def __init__(self, method='GET', body=''): self.method = method.upper() self.body = body class FakeHttpResponse(object): def __init__(self, body, content_type='text/html'): self.body = body self.content_type = content_type s...
ed85bde14d8c37144352d7526c674c26fa577407
dnsimple/record.py
dnsimple/record.py
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): success = False self.assign(attributes) response = self.reque...
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): self.assign(attributes) response = self.request.put( 'doma...
Remove unused assignment in `Record` class
Remove unused assignment in `Record` class
Python
mit
vigetlabs/dnsimple
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): success = False self.assign(attributes) response = self.reque...
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): self.assign(attributes) response = self.request.put( 'doma...
<commit_before>from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): success = False self.assign(attributes) respon...
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): self.assign(attributes) response = self.request.put( 'doma...
from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): success = False self.assign(attributes) response = self.reque...
<commit_before>from .model import Model class Record(Model, object): def __init__(self, request, domain, attributes): self.domain = domain super(Record, self).__init__(request, attributes) def update(self, attributes): success = False self.assign(attributes) respon...
304713ca8731c2ef27743abb772456d55ad0f3a8
python/ql/test/library-tests/frameworks/django-v2-v3/testapp/urls.py
python/ql/test/library-tests/frameworks/django-v2-v3/testapp/urls.py
from django.urls import path, re_path # This version 1.x way of defining urls is deprecated in Django 3.1, but still works from django.conf.urls import url from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to pro...
from django.urls import path, re_path from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to problems with # inline expectation tests (which thinks the `$` would mark the beginning of a new # line) re_pa...
Handle django v4 as well in tests
Python: Handle django v4 as well in tests
Python
mit
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
from django.urls import path, re_path # This version 1.x way of defining urls is deprecated in Django 3.1, but still works from django.conf.urls import url from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to pro...
from django.urls import path, re_path from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to problems with # inline expectation tests (which thinks the `$` would mark the beginning of a new # line) re_pa...
<commit_before>from django.urls import path, re_path # This version 1.x way of defining urls is deprecated in Django 3.1, but still works from django.conf.urls import url from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of str...
from django.urls import path, re_path from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to problems with # inline expectation tests (which thinks the `$` would mark the beginning of a new # line) re_pa...
from django.urls import path, re_path # This version 1.x way of defining urls is deprecated in Django 3.1, but still works from django.conf.urls import url from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of string, due to pro...
<commit_before>from django.urls import path, re_path # This version 1.x way of defining urls is deprecated in Django 3.1, but still works from django.conf.urls import url from . import views urlpatterns = [ path("foo/", views.foo), # $routeSetup="foo/" # TODO: Doesn't include standard `$` to mark end of str...
bb0728a6e73f3995968ee7c59ffcb03fae65d983
quotes/templatetags/quote_tags.py
quotes/templatetags/quote_tags.py
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ random_quote = Quote.objects.order_by('?')[0] return {'random_quote': random_quote}
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ try: random_quote = Quote.objects.order_by('?')[0] except ValueError: ...
Fix for allowing for empty database
Fix for allowing for empty database
Python
bsd-3-clause
davemerwin/django-quotes
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ random_quote = Quote.objects.order_by('?')[0] return {'random_quote': random_quote}Fix...
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ try: random_quote = Quote.objects.order_by('?')[0] except ValueError: ...
<commit_before>from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ random_quote = Quote.objects.order_by('?')[0] return {'random_quote': r...
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ try: random_quote = Quote.objects.order_by('?')[0] except ValueError: ...
from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ random_quote = Quote.objects.order_by('?')[0] return {'random_quote': random_quote}Fix...
<commit_before>from django import template from quotes.models import Quote register = template.Library() @register.inclusion_tag('quotes/random_quote.html') def show_random_quote(): """ For generating a single random quote """ random_quote = Quote.objects.order_by('?')[0] return {'random_quote': r...
724b80b44229b531d7a11cb7cc9f6ad88d9aedb0
bnw_handlers/command_userinfo.py
bnw_handlers/command_userinfo.py
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
Fix userinfo api command (send ok=True)
Fix userinfo api command (send ok=True)
Python
bsd-2-clause
ojab/bnw,stiletto/bnw,stiletto/bnw,ojab/bnw,un-def/bnw,ojab/bnw,stiletto/bnw,ojab/bnw,un-def/bnw,un-def/bnw,un-def/bnw,stiletto/bnw
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
<commit_before>from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.S...
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.Subscription.fin...
<commit_before>from twisted.internet import defer import bnw_core.bnw_objects as objs @defer.inlineCallbacks def cmd_userinfo(request, user=''): if not user: defer.returnValue(dict(ok=False, desc='Username required.')) user_obj = yield objs.User.find_one({'name': user}) subscribers = yield objs.S...
3c01227bfef6e8cabdca9fe9fe620763a28bff88
colorlog/logging.py
colorlog/logging.py
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(**kwargs): """Call ``logging.basicConfig`` and override the ...
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(style='%', log_colors=None, reset=True, secondary_log_colors=Non...
Add extra parameters for ColoredFormatter to the basicConfig
Add extra parameters for ColoredFormatter to the basicConfig
Python
mit
borntyping/python-colorlog
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(**kwargs): """Call ``logging.basicConfig`` and override the ...
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(style='%', log_colors=None, reset=True, secondary_log_colors=Non...
<commit_before>"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(**kwargs): """Call ``logging.basicConfig`` an...
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(style='%', log_colors=None, reset=True, secondary_log_colors=Non...
"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(**kwargs): """Call ``logging.basicConfig`` and override the ...
<commit_before>"""Wrappers around the logging module.""" from __future__ import absolute_import import functools import logging from colorlog.colorlog import ColoredFormatter BASIC_FORMAT = "%(log_color)s%(levelname)s%(reset)s:%(name)s:%(message)s" def basicConfig(**kwargs): """Call ``logging.basicConfig`` an...
1afebd46c8cf786673adface7724e9488df17a7e
appengine-experimental/src/models.py
appengine-experimental/src/models.py
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
Tweak the "inactive" timeout a bit to take latency into account.
Tweak the "inactive" timeout a bit to take latency into account.
Python
isc
lectroidmarc/SacTraffic,lectroidmarc/SacTraffic
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
<commit_before>from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty(...
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = ...
<commit_before>from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty(...
cb1de4cc77e3368ed730c14044f76f2d20c3d909
dashi/generator.py
dashi/generator.py
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
Update more references to the old config style
Update more references to the old config style
Python
mit
EliRibble/dashi,EliRibble/dashi
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
<commit_before>import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2....
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2.FileSystemLoade...
<commit_before>import asyncio import collections import dashi.config import dashi.db import dashi.time import datetime import functools import jinja2 import logging import os import pprint LOGGER = logging.getLogger(__name__) @asyncio.coroutine def go(): config = dashi.config.parse() template_loader = jinja2....
8948536f0faf12d36b0da48ae5f45d00a022ebb7
InvenTree/InvenTree/helpers.py
InvenTree/InvenTree/helpers.py
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
Allow export of binary file data
Allow export of binary file data - Use io.BytesIO for non-string-data file objects
Python
mit
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
<commit_before>import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(...
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(data, filename,...
<commit_before>import io from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse def WrapWithQuotes(text): # TODO - Make this better if not text.startswith('"'): text = '"' + text if not text.endswith('"'): text = text + '"' return text def DownloadFile(...
fbb532473bc6434628c6f01fabb8eae3ad60a171
nn/linear.py
nn/linear.py
import tensorflow as tf from . import var_init from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collecti...
import tensorflow as tf from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collection(tf.GraphKeys.BIASES,...
Remove an extra import statement
Remove an extra import statement
Python
unlicense
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
import tensorflow as tf from . import var_init from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collecti...
import tensorflow as tf from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collection(tf.GraphKeys.BIASES,...
<commit_before>import tensorflow as tf from . import var_init from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf....
import tensorflow as tf from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collection(tf.GraphKeys.BIASES,...
import tensorflow as tf from . import var_init from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf.add_to_collecti...
<commit_before>import tensorflow as tf from . import var_init from .util import static_shape from .variable import variable def linear(x, output_layer_size): weight = variable([static_shape(x)[1], output_layer_size]) bias = variable([output_layer_size]) tf.add_to_collection(tf.GraphKeys.WEIGHTS, weight) tf....
dcecd75cae428bb27ec8759a21e52267a55f149a
django_comments/signals.py
django_comments/signals.py
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
Remove Signal(providing_args) argument b/c it is deprecated
Remove Signal(providing_args) argument b/c it is deprecated RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
Python
bsd-3-clause
django/django-contrib-comments,django/django-contrib-comments
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
<commit_before>""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will b...
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
<commit_before>""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will b...
75dca1c2d39126556ded5f328461986a9eabb230
django_webtest/backends.py
django_webtest/backends.py
from __future__ import absolute_import from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ def authenticate(self, request, django_webtest_user): return sup...
from __future__ import absolute_import from django.utils.version import get_complete_version from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ if get_complete_ver...
Define WebtestUserBackend.authenticate based on Django version
Define WebtestUserBackend.authenticate based on Django version This is required because the signature of RemoteUserBackend.authenticate has changed in Django 1.11.
Python
mit
django-webtest/django-webtest,kmike/django-webtest,django-webtest/django-webtest,kmike/django-webtest
from __future__ import absolute_import from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ def authenticate(self, request, django_webtest_user): return sup...
from __future__ import absolute_import from django.utils.version import get_complete_version from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ if get_complete_ver...
<commit_before>from __future__ import absolute_import from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ def authenticate(self, request, django_webtest_user): ...
from __future__ import absolute_import from django.utils.version import get_complete_version from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ if get_complete_ver...
from __future__ import absolute_import from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ def authenticate(self, request, django_webtest_user): return sup...
<commit_before>from __future__ import absolute_import from django.contrib.auth.backends import RemoteUserBackend from .compat import from_wsgi_safe_string class WebtestUserBackend(RemoteUserBackend): """ Auth backend for django-webtest auth system """ def authenticate(self, request, django_webtest_user): ...
03d628abc4711bb0de4a7a0ef13cc4c0ecb92032
opps/articles/tests/models.py
opps/articles/tests/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
Add test articles (post), check child_class
Add test articles (post), check child_class
Python
mit
YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,YACOWS/opps,opps/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) self.assertEqu...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from opps.articles.models import Post class PostModelTest(TestCase): fixtures = ['tests/initial_data.json'] def test_basic_post_exist(self): post = Post.objects.all() self.assertTrue(post) ...
dc1b2ce87bdd5aa3b891d43f5d8b5c465dc909d1
project_user_story/project.py
project_user_story/project.py
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): return { 'name': _('User Story'), ...
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): print 'context', self._context return { ...
FIX don loose context when creating from story form view
FIX don loose context when creating from story form view
Python
agpl-3.0
levkar/odoo-addons,ingadhoc/partner,ingadhoc/odoo-addons,ingadhoc/stock,dvitme/odoo-addons,ingadhoc/product,ingadhoc/account-analytic,ingadhoc/product,adhoc-dev/odoo-addons,sysadminmatmoz/ingadhoc,maljac/odoo-addons,levkar/odoo-addons,maljac/odoo-addons,ClearCorp/account-financial-tools,sysadminmatmoz/ingadhoc,adhoc-de...
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): return { 'name': _('User Story'), ...
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): print 'context', self._context return { ...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): return { 'name': _('User Stor...
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): print 'context', self._context return { ...
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): return { 'name': _('User Story'), ...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api, _ class task(models.Model): _inherit = 'project.task' user_story = fields.Boolean( 'Is User Story?', default=False) @api.multi def action_open_task(self): return { 'name': _('User Stor...
eefc9f9757c0cf21c2ca06a791d03c4dea608fd2
tools/update_chipmunk_src.py
tools/update_chipmunk_src.py
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
Fix update chipmunk src script to run on python 3
Fix update chipmunk src script to run on python 3
Python
mit
viblo/pymunk,viblo/pymunk
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
<commit_before> import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: ...
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: chipmunk_g...
<commit_before> import sys, os.path import subprocess import shutil pymunk_src_path = os.path.join("..", "chipmunk_src") shutil.rmtree(os.path.join(pymunk_src_path, "src"), True) shutil.rmtree(os.path.join(pymunk_src_path, "include"), True) if len(sys.argv) > 1: chipmunk_git_path = sys.argv[1] else: ...
f845fcfc145edd2ef55df3275971f5c940a61bb4
tests/list_match.py
tests/list_match.py
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = Cons(1, Cons(2, Cons(3, Nil))) b = match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), ("_", lambda: 4)) assert b == 2, "List pattern match" return 0
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = hint(Cons(1, Cons(2, Cons(3, Nil))), a='int') #b = hint(match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), # ("_", lambda: 4)), a='int') #assert b == 2, "List pattern match" ...
Disable match() test for now
Disable match() test for now
Python
mit
pshc/archipelago,pshc/archipelago,pshc/archipelago
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = Cons(1, Cons(2, Cons(3, Nil))) b = match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), ("_", lambda: 4)) assert b == 2, "List pattern match" return 0 Disable match() test f...
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = hint(Cons(1, Cons(2, Cons(3, Nil))), a='int') #b = hint(match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), # ("_", lambda: 4)), a='int') #assert b == 2, "List pattern match" ...
<commit_before>from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = Cons(1, Cons(2, Cons(3, Nil))) b = match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), ("_", lambda: 4)) assert b == 2, "List pattern match" return 0 <commit...
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = hint(Cons(1, Cons(2, Cons(3, Nil))), a='int') #b = hint(match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), # ("_", lambda: 4)), a='int') #assert b == 2, "List pattern match" ...
from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = Cons(1, Cons(2, Cons(3, Nil))) b = match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), ("_", lambda: 4)) assert b == 2, "List pattern match" return 0 Disable match() test f...
<commit_before>from bedrock import * @annot('void -> int') def main(): a = hint(Cons(0, Cons(1, Nil())), a='int') a = Cons(1, Cons(2, Cons(3, Nil))) b = match(a, ("Cons(_, Cons(two, Cons(_, Nil())))", identity), ("_", lambda: 4)) assert b == 2, "List pattern match" return 0 <commit...
6233207fd57d499bc2bcd313a5b6d829ed712eab
tests/test_check.py
tests/test_check.py
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
Handle differences between semver and PEP440
Handle differences between semver and PEP440 Signed-off-by: Sylvain Hellegouarch <16795633e2c1543064a3ad70ac3ba71d3d589b3b@defuze.org>
Python
apache-2.0
chaostoolkit/chaostoolkit
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
<commit_before># -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url ...
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
# -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url self.respons...
<commit_before># -*- coding: utf-8 -*- from unittest.mock import patch import semver from chaostoolkit import __version__ from chaostoolkit.check import check_newer_version class FakeResponse: def __init__(self, status=200, url=None, response=None): self.status_code = status self.url = url ...
d89747e26371b1986b4cec5a7514ba2c99480487
tests/test_codec.py
tests/test_codec.py
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
Allow codec test to have more than just the one format
Allow codec test to have more than just the one format
Python
bsd-3-clause
mcpv/PyAV,danielballan/PyAV,pupil-labs/PyAV,PyAV-Org/PyAV,markreidvfx/PyAV,PyAV-Org/PyAV,xxr3376/PyAV,pupil-labs/PyAV,pupil-labs/PyAV,xxr3376/PyAV,mikeboers/PyAV,markreidvfx/PyAV,danielballan/PyAV,danielballan/PyAV,xxr3376/PyAV,markreidvfx/PyAV,mcpv/PyAV,mikeboers/PyAV,mcpv/PyAV,pupil-labs/PyAV
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
<commit_before>from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') ...
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') self....
<commit_before>from .common import * from av.codec import Codec, Encoder, Decoder class TestCodecs(TestCase): def test_codec_mpeg4(self): for cls in (Encoder, Decoder): c = cls('mpeg4') self.assertEqual(c.name, 'mpeg4') self.assertEqual(c.long_name, 'MPEG-4 part 2') ...
82380cc6631ae91e0ef961e3bdfde70b9710af0f
reddit_liveupdate/activity.py
reddit_liveupdate/activity.py
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
Add comment to amqp.worker.join call.
Add comment to amqp.worker.join call.
Python
bsd-3-clause
florenceyeun/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
<commit_before>from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: ...
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: coun...
<commit_before>from r2.lib import amqp, websockets from reddit_liveupdate.models import ActiveVisitorsByLiveUpdateEvent def broadcast_update(): event_ids = ActiveVisitorsByLiveUpdateEvent._cf.get_range( column_count=1, filter_empty=False) for event_id, is_active in event_ids: if is_active: ...
6fee21a630a9ba3b54f58152cb4549b4170b833f
docdata/urls.py
docdata/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )
Fix URL's to work with Django 1.5
Fix URL's to work with Django 1.5
Python
agpl-3.0
dokterbob/django-docdata
from django.conf.urls.defaults import * urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )Fix URL's to work with Django 1.5
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )<commit_msg>Fix URL's to work with Django 1.5<commit_after>
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )
from django.conf.urls.defaults import * urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )Fix URL's to work with Django 1.5from django.conf.urls.defaults import patterns, url urlpatterns = patterns('docdata.views', # S...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('docdata.views', # Status change notifications url(r'^status_change/$', 'status_change', name='status_change'), )<commit_msg>Fix URL's to work with Django 1.5<commit_after>from django.conf.urls.defaults import patterns, url urlpat...
3f2d27f63c1cfe2cc4616a4314420fa23daca487
django_lightweight_queue/task.py
django_lightweight_queue/task.py
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
Allow overriding timeout and sigkill_on_stop too.
Allow overriding timeout and sigkill_on_stop too. Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@thread.com>
Python
bsd-3-clause
thread/django-lightweight-queue,prophile/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,lamby/django-lightweight-queue
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
<commit_before>from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings.WORKERS.setdef...
<commit_before>from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None, sigkill_on_stop=False): self.queue = queue self.timeout = timeout self.sigkill_on_stop = sigkill_on_stop app_settings...
2c013f4fd30e93dc50f844a6c507b6b9f7d1c80e
doc/users/figures/background2.py
doc/users/figures/background2.py
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
Remove a redudant "plt.show()" statement
Remove a redudant "plt.show()" statement
Python
mit
matplotlib/basemap,guziy/basemap,guziy/basemap,matplotlib/basemap
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
<commit_before>from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # dra...
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea ma...
<commit_before>from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # dra...
542f0d6f3091e1cbc3ab0563d2915a9ac80c3c91
edmunds/exceptions/handler.py
edmunds/exceptions/handler.py
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
Fix response for testing errors
Fix response for testing errors
Python
apache-2.0
LowieHuyghe/edmunds
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
<commit_before> from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ ...
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ self.ap...
<commit_before> from werkzeug.exceptions import HTTPException import sys from six import reraise class Handler(object): """ The Exception handler """ def __init__(self, app): """ Initiate :param app: The application :type app: Edmunds.Application """ ...
442567a959b9fd5796de2f13154f66cdb25534b3
python/default_crab_config.py
python/default_crab_config.py
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
Allow crab to run on PRODUCTION datasets
Allow crab to run on PRODUCTION datasets
Python
mit
cp3-llbb/GridIn,cp3-llbb/GridIn
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
<commit_before>__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.tra...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
<commit_before>__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.tra...
5834fd76b74650366eb73c759541116cfbbfcbbe
radar/web/template_filters.py
radar/web/template_filters.py
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
Update nl2br to work with None as input
Update nl2br to work with None as input
Python
agpl-3.0
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
<commit_before>from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: ret...
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: return '%04d' % dt...
<commit_before>from jinja2 import escape, Markup, evalcontextfilter from radar.lib.utils import date_to_datetime, is_date def strftime(dt, dt_format): if dt is None: return '' else: return dt.strftime(dt_format) def year_format(dt): if dt is None: return '' else: ret...
8c07f3decfc5fb556c9818172e6b7749d31eca37
purchase_open_qty/__manifest__.py
purchase_open_qty/__manifest__.py
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
Delete empty " " spaces in same string line
[FIX] Delete empty " " spaces in same string line
Python
agpl-3.0
OCA/purchase-workflow,OCA/purchase-workflow
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
<commit_before># Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "1...
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
# Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "13.0.1.0.1", ...
<commit_before># Copyright 2017 ForgeFlow S.L. # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Purchase Open Qty", "summary": "Allows to identify the purchase orders that have quantities " "pending to invoice or to receive.", "version": "1...
66039d5238c7c18156f6a5bbbe8c28232bb65483
example/main.py
example/main.py
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application class Home(Application): def get(self, request_args=No...
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application, StaticFile class Home(Application): def get(self, req...
Add sample used StaticFile server
Add sample used StaticFile server
Python
mit
beni55/nacho,beni55/nacho,avelino/nacho
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application class Home(Application): def get(self, request_args=No...
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application, StaticFile class Home(Application): def get(self, req...
<commit_before>#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application class Home(Application): def get(self, ...
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application, StaticFile class Home(Application): def get(self, req...
#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application class Home(Application): def get(self, request_args=No...
<commit_before>#!/usr/bin/env python3 import logging import sys assert sys.version >= '3.3', 'Please use Python 3.3 or higher.' from nacho.routing import Router from nacho.http import HttpServer from nacho.multithreading import Superviser from nacho.app import Application class Home(Application): def get(self, ...
50c44a5708d1c054207eba264e1cdf9d1f6718da
deployer/logger.py
deployer/logger.py
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
Set log level for handler
Set log level for handler
Python
mit
totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
<commit_before>from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL...
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logge...
<commit_before>from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL...
01d812f83c5526cc304f8d691ce9203d3e95633a
sampleproj/settings/travis.py
sampleproj/settings/travis.py
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
Add dummy email addresses for unit tests.
Add dummy email addresses for unit tests.
Python
apache-2.0
charlon/mdot,uw-it-aca/mdot,uw-it-aca/mdot,charlon/mdot,uw-it-aca/mdot,uw-it-aca/mdot,charlon/mdot
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
<commit_before>""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * ...
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * # SECURITY WAR...
<commit_before>""" Django settings for travis-ci builds. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ from __future__ import absolute_import from .base import * ...
0179e6680efca8a9a6a5f05db703da1ce7447b3e
flexget/__init__.py
flexget/__init__.py
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
Fix traceback when config file is not found.
Fix traceback when config file is not found. git-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@2541 3942dd89-8c5d-46d7-aeed-044bccf3e60c
Python
mit
Danfocus/Flexget,tobinjt/Flexget,OmgOhnoes/Flexget,malkavi/Flexget,sean797/Flexget,vfrc2/Flexget,asm0dey/Flexget,vfrc2/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,v17al/Flexget,qvazzler/Flexget,jawilson/Flexget,oxc/Flexget,dsemi/Flexget,qvazzler/Flexget,asm0dey/Flexget,Pretagonist/Flexget,qk4l/Flexget,OmgOhnoes/Flexget,...
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
<commit_before>#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Li...
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Line Interface"""...
<commit_before>#!/usr/bin/python import os import sys import logging from flexget import logger from flexget.options import CoreOptionParser from flexget import plugin from flexget.manager import Manager __version__ = '{subversion}' log = logging.getLogger('main') def main(): """Main entry point for Command Li...
e0f80de15d1ddabc3bd47d6396edbaaac5a08041
examples/motion_example.py
examples/motion_example.py
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
Add missing import for sleep
motion: Add missing import for sleep Signed-off-by: Francois Berder <59eaf4bb0211c66c3d7532da6d77ecf42a779d82@outlook.fr>
Python
bsd-3-clause
francois-berder/PyLetMeCreate
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running th...
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running this program. """...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Motion Click wrapper of the LetMeCreate library. Whenever the motion click detects an event, it flashes all LED's ten times. The user must press Ctrl+C to terminate the program. The Motion Click must be inserted in Mikrobus 1 before running th...
14d9b5fd2e24245ac3333d1a1fe6a4a9fd33751a
example/example.py
example/example.py
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline, recorders @record() def pipeline_stage_1(): call([os.path.expanduser('~/programming/Plumbium/example/example_script.sh')]) @record() def pipeline_stage_2(): call([os.path.expanduser('~/programming/Plumbium/...
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline from plumbium.recorders import CSVFile @record() def pipeline_stage_1(): call(['echo', 'foo']) @record() def pipeline_stage_2(): call(['echo', 'data: 55']) def my_pipeline(): pipeline_stage_1() pip...
Update to work with recorders submodule
Update to work with recorders submodule
Python
mit
jstutters/Plumbium
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline, recorders @record() def pipeline_stage_1(): call([os.path.expanduser('~/programming/Plumbium/example/example_script.sh')]) @record() def pipeline_stage_2(): call([os.path.expanduser('~/programming/Plumbium/...
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline from plumbium.recorders import CSVFile @record() def pipeline_stage_1(): call(['echo', 'foo']) @record() def pipeline_stage_2(): call(['echo', 'data: 55']) def my_pipeline(): pipeline_stage_1() pip...
<commit_before>from collections import OrderedDict import os import sys from plumbium import call, record, pipeline, recorders @record() def pipeline_stage_1(): call([os.path.expanduser('~/programming/Plumbium/example/example_script.sh')]) @record() def pipeline_stage_2(): call([os.path.expanduser('~/progra...
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline from plumbium.recorders import CSVFile @record() def pipeline_stage_1(): call(['echo', 'foo']) @record() def pipeline_stage_2(): call(['echo', 'data: 55']) def my_pipeline(): pipeline_stage_1() pip...
from collections import OrderedDict import os import sys from plumbium import call, record, pipeline, recorders @record() def pipeline_stage_1(): call([os.path.expanduser('~/programming/Plumbium/example/example_script.sh')]) @record() def pipeline_stage_2(): call([os.path.expanduser('~/programming/Plumbium/...
<commit_before>from collections import OrderedDict import os import sys from plumbium import call, record, pipeline, recorders @record() def pipeline_stage_1(): call([os.path.expanduser('~/programming/Plumbium/example/example_script.sh')]) @record() def pipeline_stage_2(): call([os.path.expanduser('~/progra...
3c573e2b02a18627b82f4a25fef67adae295d653
rbm2m/models/setting.py
rbm2m/models/setting.py
# -*- coding: utf-8 -*- from sqlalchemy import Column, String from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(String(512)) default_value = Column(String(512)) title = Column(String(127), nullable=Fa...
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, Text from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(Text) default_value = Column(Text) title = Column(String(127), nullable=False) ...
Set setings.value type to text
Set setings.value type to text
Python
apache-2.0
notapresent/rbm2m,notapresent/rbm2m
# -*- coding: utf-8 -*- from sqlalchemy import Column, String from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(String(512)) default_value = Column(String(512)) title = Column(String(127), nullable=Fa...
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, Text from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(Text) default_value = Column(Text) title = Column(String(127), nullable=False) ...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import Column, String from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(String(512)) default_value = Column(String(512)) title = Column(String(12...
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, Text from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(Text) default_value = Column(Text) title = Column(String(127), nullable=False) ...
# -*- coding: utf-8 -*- from sqlalchemy import Column, String from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(String(512)) default_value = Column(String(512)) title = Column(String(127), nullable=Fa...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import Column, String from .base import Base class Setting(Base): __tablename__ = 'settings' name = Column(String(32), nullable=False, primary_key=True) value = Column(String(512)) default_value = Column(String(512)) title = Column(String(12...
7f57e850619f0a4ca4f63aa26234ce3fba8b9cf0
reference/gittaggers.py
reference/gittaggers.py
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
Fix Python packaging to use correct git log for package time/version stamps.
Fix Python packaging to use correct git log for package time/version stamps.
Python
apache-2.0
foreveremain/common-workflow-language,SciDAP/cwltool,brainstorm/common-workflow-language,dleehr/common-workflow-language,dleehr/cwltool,guillermo-carrasco/common-workflow-language,dleehr/cwltool,ohsu-computational-biology/common-workflow-language,StarvingMarvin/common-workflow-language,satra/common-workflow-language,mr...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
599ec99b6f57e37f7f4009afb9498abffd70ff34
grammpy_transforms/SplittedRules/splitted_rules.py
grammpy_transforms/SplittedRules/splitted_rules.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal def splitted_rules(root: Nonterminal): return root
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal, Rule, EPSILON from grammpy.Grammars.MultipleRulesGrammar import SplitRule class Adding: def __init__(self, rule: Rule): self.rule = rule self.process...
Add implementation of splitted rules
Add implementation of splitted rules
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal def splitted_rules(root: Nonterminal): return root Add implementation of splitted rules
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal, Rule, EPSILON from grammpy.Grammars.MultipleRulesGrammar import SplitRule class Adding: def __init__(self, rule: Rule): self.rule = rule self.process...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal def splitted_rules(root: Nonterminal): return root <commit_msg>Add implementation of splitted rules<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal, Rule, EPSILON from grammpy.Grammars.MultipleRulesGrammar import SplitRule class Adding: def __init__(self, rule: Rule): self.rule = rule self.process...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal def splitted_rules(root: Nonterminal): return root Add implementation of splitted rules#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Li...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.12.2017 16:05 :Licence GNUv3 Part of transofmer """ from grammpy import Nonterminal def splitted_rules(root: Nonterminal): return root <commit_msg>Add implementation of splitted rules<commit_after>#!/usr/bin/env python """ :Author Patr...
1db16a65b114d514257d4525c41e0b3f74d1d479
dataset/dataset/settings.py
dataset/dataset/settings.py
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
Enable Feed Exports and set to JSONLines
Enable Feed Exports and set to JSONLines
Python
mit
MaxLikelihood/CODE
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
<commit_before># Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODU...
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
# Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODULE = 'dataset.s...
<commit_before># Scrapy settings for dataset project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'dataset' SPIDER_MODULES = ['dataset.spiders'] NEWSPIDER_MODU...