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
b52a23c87bed0370c41da39785812b9064688af0
passman/__main__.py
passman/__main__.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto import commandline import database import encry...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto from passman.login import handleLogin, handleOf...
Remove unnecessary imports from main
Remove unnecessary imports from main
Python
mit
regexpressyourself/passman
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto import commandline import database import encry...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto from passman.login import handleLogin, handleOf...
<commit_before>#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto import commandline import databa...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto from passman.login import handleLogin, handleOf...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto import commandline import database import encry...
<commit_before>#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Main driver of the program ''' import sys import random import os import json import argparse import time import getpass import hashlib import ast import threading import base64 import pymongo import pyperclip import Crypto import commandline import databa...
9e960b508988c4049eb9f3377c505f506a3af060
example/shutdown_client.py
example/shutdown_client.py
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
Fix example of shutting down a client.
Fix example of shutting down a client. Fix #1261.
Python
bsd-3-clause
aaugustin/websockets,aaugustin/websockets,aaugustin/websockets,aaugustin/websockets
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
<commit_before>#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler(...
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler( si...
<commit_before>#!/usr/bin/env python import asyncio import signal import websockets async def client(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: # Close the connection when receiving SIGTERM. loop = asyncio.get_running_loop() loop.add_signal_handler(...
72068701db46dc3d66cde295187b7d167cbfd880
gather/account/api.py
gather/account/api.py
# -*- coding:utf-8 -*- from flask import g, jsonify from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instance_id`, t...
# -*- coding:utf-8 -*- from flask import g, jsonify, request from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instan...
Add API to change password
Add API to change password
Python
mit
whtsky/Gather,whtsky/Gather
# -*- coding:utf-8 -*- from flask import g, jsonify from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instance_id`, t...
# -*- coding:utf-8 -*- from flask import g, jsonify, request from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instan...
<commit_before># -*- coding:utf-8 -*- from flask import g, jsonify from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `...
# -*- coding:utf-8 -*- from flask import g, jsonify, request from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instan...
# -*- coding:utf-8 -*- from flask import g, jsonify from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `instance_id`, t...
<commit_before># -*- coding:utf-8 -*- from flask import g, jsonify from gather.account.models import Account from gather.api import need_auth, EXCLUDE_COLUMNS from gather.extensions import api_manager __all__ = ["bp"] def patch_single_preprocessor(instance_id=None, data=None, **kw): """Accepts two arguments, `...
5b4049b3aa27a8a2e02c768eb411b35f4518821e
predict_imagenet.py
predict_imagenet.py
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
Remove extra support for 1000 classes as no longer needed
Remove extra support for 1000 classes as no longer needed
Python
apache-2.0
titu1994/MobileNetworks
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
<commit_before>from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. r...
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x if __...
<commit_before>from __future__ import print_function from __future__ import absolute_import from keras.applications.imagenet_utils import decode_predictions from keras.preprocessing import image import numpy as np from mobilenets import MobileNets def preprocess_input(x): x /= 255. x -= 0.5 x *= 2. r...
f4837fd60ce09b69d334fcad1403b721723d3504
tests/test_conf.py
tests/test_conf.py
import sys from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Setting...
from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Settings() as...
Remove unused sys import from conf tests
Remove unused sys import from conf tests
Python
mit
rougeth/bottery
import sys from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Setting...
from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Settings() as...
<commit_before>import sys from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): set...
from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Settings() as...
import sys from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): settings = Setting...
<commit_before>import sys from unittest import mock import pytest from bottery.conf import Settings @pytest.fixture def mocked_settings(): settings = mock.MagicMock() sys.modules['settings'] = settings yield settings del sys.modules['settings'] @pytest.mark.skip def test_global_settings(): set...
b60e76f6d6c5363ed4d07b43338911b3cdb8ca39
ofp_app/demo/conntest.py
ofp_app/demo/conntest.py
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest') @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn in conns.stats: ...
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest', kill_on_exception=True) @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn ...
Terminate app if handler throws exception.
Terminate app if handler throws exception.
Python
mit
byllyfish/pylibofp,byllyfish/pylibofp
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest') @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn in conns.stats: ...
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest', kill_on_exception=True) @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn ...
<commit_before>from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest') @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn in conns....
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest', kill_on_exception=True) @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn ...
from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest') @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn in conns.stats: ...
<commit_before>from ofp_app import ofp_app, ofp_run import asyncio app = ofp_app('conntest') @app.event('start') async def start(_): while True: await asyncio.sleep(1) # Obtain a list of connections. conns = await app.rpc_call('OFP.LIST_CONNECTIONS', conn_id=0) for conn in conns....
89b14bd0add6a56d9128f2ce3fa4ca710f64d5d7
opal/tests/test_utils.py
opal/tests/test_utils.py
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) class Itersubc...
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) def test_im...
Add some tests for stringport
Add some tests for stringport
Python
agpl-3.0
khchine5/opal,khchine5/opal,khchine5/opal
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) class Itersubc...
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) def test_im...
<commit_before>""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) ...
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) def test_im...
""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) class Itersubc...
<commit_before>""" Unittests for opal.utils """ from django.test import TestCase from django.db.models import ForeignKey, CharField from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections self.assertEqual(collections, utils.stringport('collections')) ...
265e169570db18b53b86a55b94871f1eb25dfd4d
gvi/transactions/models.py
gvi/transactions/models.py
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
Change the field type of amount and balance to DecimalField
Change the field type of amount and balance to DecimalField
Python
mit
m1k3r/gvi-accounts,m1k3r/gvi-accounts,m1k3r/gvi-accounts
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
<commit_before>from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) categor...
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) category = models.Fore...
<commit_before>from django.db import models class Category(models.Model): name = models.CharField(max_length=50) number = models.CharField(max_length=50, unique=True) def __str__(self): return self.number class Subcategory(models.Model): name = models.CharField(max_length=50) categor...
dc47c88d5f1c6f1e78322c5bfcb585e54b3a0c0a
python/colorTest.py
python/colorTest.py
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
Remove print and increase speed
Remove print and increase speed
Python
mit
DarkAce65/rpi-led-matrix,DarkAce65/rpi-led-matrix
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
<commit_before>#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g...
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g = int(x % 8 / ...
<commit_before>#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width for x in range(width): for y in range(height): r = int(y % 8 / 7.0 * 255) g...
0fa9b1abef3c7310d8f840d35bb417f74093d5cf
src/main.py
src/main.py
#!/usr/bin/python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
#!/usr/bin/env python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
Fix for use in virtualenv
Fix for use in virtualenv
Python
mit
grsakea/pyt
#!/usr/bin/python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main() Fix for use in virtualenv
#!/usr/bin/env python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
<commit_before>#!/usr/bin/python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main() <commit_msg>Fix for use in vir...
#!/usr/bin/env python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
#!/usr/bin/python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main() Fix for use in virtualenv#!/usr/bin/env pytho...
<commit_before>#!/usr/bin/python3 import sys import window from PyQt5.QtWidgets import QApplication def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main() <commit_msg>Fix for use in vir...
458f1e269646f432ef52774230114a4b05351211
controllers/default.py
controllers/default.py
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
Use the new location of study NexSON
Use the new location of study NexSON Each study now has a distinct directory. Currently we only plan to store a single JSON file in each directory, until one becomes larger than 50MB. Additionally, this allows various metadata/artifacts about a study to live near the actually study data.
Python
bsd-2-clause
leto/new_opentree_api,leto/new_opentree_api
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
<commit_before>import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) ...
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) def POST(resou...
<commit_before>import os def index(): def GET(): return locals() @request.restful() def api(): response.view = 'generic.json' def GET(resource,resource_id): if not resource=='study': raise HTTP(400) # return the correct nexson of study_id return _get_nexson(resource_id) ...
57428c3ef4c80733c2309aea2db71624b188a055
oath_toolkit/_compat.py
oath_toolkit/_compat.py
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Fix broken test on Python 3.3
Fix broken test on Python 3.3
Python
apache-2.0
malept/pyoath-toolkit,malept/pyoath-toolkit,malept/pyoath-toolkit
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # 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 ap...
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2013 Mark Lee # # 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 ap...
5b8fe62647eade5d9c060c027e5658cf0eb531f2
pygraphc/clustering/__init__.py
pygraphc/clustering/__init__.py
from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterEvaluation import * from pygraphc.clustering.ClusterUtility import * from pygraphc.clustering.ConnectedComponents import * from pygraphc.clustering.KCliquePercolation import * from pygraphc.clustering.MaxCliquesPercolation import * impor...
import pygraphc.clustering.ClusterDistance import pygraphc.clustering.ClusterUtility import pygraphc.clustering.ConnectedComponents import pygraphc.clustering.KCliquePercolation import pygraphc.clustering.MaxCliquesPercolation from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterUtility imp...
Change path for the module ClusterEvaluation
Change path for the module ClusterEvaluation
Python
mit
studiawan/pygraphc
from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterEvaluation import * from pygraphc.clustering.ClusterUtility import * from pygraphc.clustering.ConnectedComponents import * from pygraphc.clustering.KCliquePercolation import * from pygraphc.clustering.MaxCliquesPercolation import * impor...
import pygraphc.clustering.ClusterDistance import pygraphc.clustering.ClusterUtility import pygraphc.clustering.ConnectedComponents import pygraphc.clustering.KCliquePercolation import pygraphc.clustering.MaxCliquesPercolation from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterUtility imp...
<commit_before>from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterEvaluation import * from pygraphc.clustering.ClusterUtility import * from pygraphc.clustering.ConnectedComponents import * from pygraphc.clustering.KCliquePercolation import * from pygraphc.clustering.MaxCliquesPercolation ...
import pygraphc.clustering.ClusterDistance import pygraphc.clustering.ClusterUtility import pygraphc.clustering.ConnectedComponents import pygraphc.clustering.KCliquePercolation import pygraphc.clustering.MaxCliquesPercolation from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterUtility imp...
from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterEvaluation import * from pygraphc.clustering.ClusterUtility import * from pygraphc.clustering.ConnectedComponents import * from pygraphc.clustering.KCliquePercolation import * from pygraphc.clustering.MaxCliquesPercolation import * impor...
<commit_before>from pygraphc.clustering.ClusterDistance import * from pygraphc.clustering.ClusterEvaluation import * from pygraphc.clustering.ClusterUtility import * from pygraphc.clustering.ConnectedComponents import * from pygraphc.clustering.KCliquePercolation import * from pygraphc.clustering.MaxCliquesPercolation ...
4339b61aad98d10f91f44c82b72376bc88c3ec22
pivot/views/data_api.py
pivot/views/data_api.py
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
Clean up now that we're no longer trying to use CSV_URL.
Clean up now that we're no longer trying to use CSV_URL.
Python
apache-2.0
uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
<commit_before>import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse fr...
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.conf ...
<commit_before>import os try: from urllib.parse import urljoin from urllib.request import urlopen except: # for Python 2.7 compatibility from urlparse import urljoin from urllib2 import urlopen from django.shortcuts import render from django.views import View from django.http import HttpResponse fr...
05551b6b7ed1ed9a97be635f3d32b5bd4f26f635
tests/mltils/test_infrequent_value_encoder.py
tests/mltils/test_infrequent_value_encoder.py
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
Add more unit tests for InfrequentValueEncoder
Add more unit tests for InfrequentValueEncoder
Python
mit
rladeira/mltils
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
<commit_before># pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A...
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
# pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A': ['a', 'a', '...
<commit_before># pylint: disable=missing-docstring, invalid-name, import-error import pandas as pd from mltils.encoders import InfrequentValueEncoder def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is not None def test_infrequent_value_encoder_2(): df = pd.DataFrame({'A...
85698cd291753a9ef352250e03a77b14b3f1f9ab
steam/d2.py
steam/d2.py
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
Use potential true app ID for D2
Use potential true app ID for D2
Python
isc
miedzinski/steamodd,Lagg/steamodd
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
<commit_before>""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear...
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies....
<commit_before>""" Module for reading DOTA 2 data using the Steam API Copyright (c) 2010, Anthony Garcia <lagg@lavabit.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear...
d879d74aa078ca5a89a7e7cbd1bebe095449411d
snobol/constants.py
snobol/constants.py
# Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0.497, 0.7078, 0.576, -0.713, 0.239, -0.027] #...
"""Constants for use by the bolometric correction routine """ # Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0...
Add documentation string for cosntants module
Add documentation string for cosntants module
Python
mit
JALusk/SNoBoL,JALusk/SNoBoL,JALusk/SuperBoL
# Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0.497, 0.7078, 0.576, -0.713, 0.239, -0.027] #...
"""Constants for use by the bolometric correction routine """ # Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0...
<commit_before># Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0.497, 0.7078, 0.576, -0.713, 0....
"""Constants for use by the bolometric correction routine """ # Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0...
# Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0.497, 0.7078, 0.576, -0.713, 0.239, -0.027] #...
<commit_before># Coefficients for polynomial fit to bolometric correction - color relation coeff_BminusV = [-0.823, 5.027, -13.409, 20.133, -18.096, 9.084, -1.950] coeff_VminusI = [-1.355, 6.262, -2.676, -22.973, 35.524, -15.340] coeff_BminusI = [-1.096, 3.038, -2.246, -0.497, 0.7078, 0.576, -0.713, 0....
d2e120606d2a6e817f0c20f55dcc4296807f19df
tempdirs.py
tempdirs.py
import functools import tempfile import shutil class makedirs(object): def __init__(self, num): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
import functools import tempfile import shutil class makedirs(object): def __init__(self, num=1): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
Create 1 temp directory if no number is given
Create 1 temp directory if no number is given
Python
mit
thelinuxkid/tempdirs
import functools import tempfile import shutil class makedirs(object): def __init__(self, num): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
import functools import tempfile import shutil class makedirs(object): def __init__(self, num=1): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
<commit_before>import functools import tempfile import shutil class makedirs(object): def __init__(self, num): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
import functools import tempfile import shutil class makedirs(object): def __init__(self, num=1): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
import functools import tempfile import shutil class makedirs(object): def __init__(self, num): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
<commit_before>import functools import tempfile import shutil class makedirs(object): def __init__(self, num): self._num = num def __call__(self, fn): @functools.wraps(fn) def wrapper(*args, **kwargs): def manager(): try: dirs = [ ...
07f4d284df18c1e1be7ea9ff490fa14c1974b215
testFile.py
testFile.py
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO'
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO2'
Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes
Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes
Python
apache-2.0
adrien-bellaiche/ia-cdf-rob-2015
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO' Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO2'
<commit_before>__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO' <commit_msg>Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes<commit_after>
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO2'
__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO' Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO2'
<commit_before>__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO' <commit_msg>Add features : - Restart software in case of accidental unplug-replug - Minor bug fixes<commit_after>__author__ = 'adrie_000' p = bytes('HELLO') quit('FINISHED') print 'pHELLO2'
39bf1013c5b2b4a18be6de3a3f2002908bf36014
test/all.py
test/all.py
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
Add init tests to CI.
Add init tests to CI.
Python
mit
da4089/simplefix
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
<commit_before>#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal ...
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
<commit_before>#! /usr/bin/env python ######################################################################## # SimpleFIX # Copyright (C) 2016, David Arnold. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal ...
86a44c855ebc84d422b2338090f4ca6d0d01cee5
cf_predict/__init__.py
cf_predict/__init__.py
import sys from flask import Flask from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION: # pragma: no cover (manual test) sys.exit("Python {}.{}+ is r...
import sys from flask import Flask from mockredis import MockRedis from flask_redis import FlaskRedis from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION:...
Add Redis client from flask-redis
Add Redis client from flask-redis
Python
mit
ronert/cf-predict,ronert/cf-predict
import sys from flask import Flask from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION: # pragma: no cover (manual test) sys.exit("Python {}.{}+ is r...
import sys from flask import Flask from mockredis import MockRedis from flask_redis import FlaskRedis from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION:...
<commit_before>import sys from flask import Flask from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION: # pragma: no cover (manual test) sys.exit("Pyt...
import sys from flask import Flask from mockredis import MockRedis from flask_redis import FlaskRedis from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION:...
import sys from flask import Flask from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION: # pragma: no cover (manual test) sys.exit("Python {}.{}+ is r...
<commit_before>import sys from flask import Flask from .config import config from .api import api_bp __project__ = 'cf-predict' __version__ = '0.0.0' VERSION = "{0} v{1}".format(__project__, __version__) PYTHON_VERSION = 3, 4 if sys.version_info < PYTHON_VERSION: # pragma: no cover (manual test) sys.exit("Pyt...
c35887025a2127a527862e664d1ef3bb5c4f528a
Constants.py
Constants.py
IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)
IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)
Add some needed IRC numerics
Add some needed IRC numerics
Python
mit
Didero/DideRobot
IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)Add some needed IRC numerics
IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)
<commit_before>IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)<commit_msg>Add some needed IRC numerics<commit_after>
IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)
IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)Add some needed IRC numericsIRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTA...
<commit_before>IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"} CTCP_DELIMITER = chr(1)<commit_msg>Add some needed IRC numerics<commit_after>IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY...
b5672d55beb837f21d761f50740b93c5b1e0dc5d
napalm/exceptions.py
napalm/exceptions.py
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
Raise ConnectionException when device unusable
Raise ConnectionException when device unusable
Python
apache-2.0
napalm-automation/napalm-base,napalm-automation/napalm-base,Netflix-Skunkworks/napalm-base,napalm-automation/napalm,Netflix-Skunkworks/napalm-base,spotify/napalm,bewing/napalm-base,spotify/napalm,bewing/napalm-base
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
<commit_before># Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 #...
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
<commit_before># Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 #...
7086b1967c3a3666260e6358c72cb15c74213bea
sunpy/net/tests/test_attr.py
sunpy/net/tests/test_attr.py
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & other) is other
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr from sunpy.net.vso import attrs def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & othe...
Add tests for Attr nesting
Add tests for Attr nesting
Python
bsd-2-clause
dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & other) is other Add tests for Attr n...
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr from sunpy.net.vso import attrs def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & othe...
<commit_before># -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & other) is other <comm...
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr from sunpy.net.vso import attrs def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & othe...
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & other) is other Add tests for Attr n...
<commit_before># -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import from sunpy.net import attr def test_dummyattr(): one = attr.DummyAttr() other = attr.ValueAttr({'a': 'b'}) assert (one | other) is other assert (one & other) is other <comm...
ecc1713dcd03894cca858910d702c32b0cdf1d42
niceware/__main__.py
niceware/__main__.py
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
Correct default passphrase length following d9913ce
Correct default passphrase length following d9913ce
Python
mit
moreati/python-niceware
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
<commit_before># -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentPars...
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
# -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description=...
<commit_before># -*- coding: utf-8 -*- """Utility for generating memorable passwords""" from __future__ import absolute_import from __future__ import print_function import argparse import sys import niceware def main(args=None): if args is None: args = sys.argv[1:] parser = argparse.ArgumentPars...
6687d03808c454684c0df3e4b2605f6f86e575b7
exdir/__init__.py
exdir/__init__.py
from . import core from . import plugin_interface from . import plugins from .core import File, validation # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins()
from . import core from . import plugin_interface from . import plugins from .core import File, validation, Attribute, Dataset, Group, Raw, Object # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins()
Add types to top-level import to simplify porting from h5py
Add types to top-level import to simplify porting from h5py Previously, types like Dataset would have to be imported through exdir.core.Dataset, which exposes an internal implementation detail (everything being in exdir.core). Type-checking by comparing the type to the one imported is common in h5py code, which means...
Python
mit
CINPLA/exdir,CINPLA/exdir,CINPLA/exdir
from . import core from . import plugin_interface from . import plugins from .core import File, validation # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins() Add types to top-level import to simplify porting from h5py Prev...
from . import core from . import plugin_interface from . import plugins from .core import File, validation, Attribute, Dataset, Group, Raw, Object # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins()
<commit_before>from . import core from . import plugin_interface from . import plugins from .core import File, validation # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins() <commit_msg>Add types to top-level import to simpl...
from . import core from . import plugin_interface from . import plugins from .core import File, validation, Attribute, Dataset, Group, Raw, Object # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins()
from . import core from . import plugin_interface from . import plugins from .core import File, validation # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins() Add types to top-level import to simplify porting from h5py Prev...
<commit_before>from . import core from . import plugin_interface from . import plugins from .core import File, validation # TODO remove versioneer from ._version import get_versions __version__ = get_versions()['version'] del get_versions # core.plugin.load_plugins() <commit_msg>Add types to top-level import to simpl...
af5100682eae8992af0ddfdfc4b8bd8043718bc6
commandment/pki/ssl.py
commandment/pki/ssl.py
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
Fix invalid statement for SubjectAlternativeName in self signed cert.
Fix invalid statement for SubjectAlternativeName in self signed cert.
Python
mit
mosen/commandment,jessepeterson/commandment,mosen/commandment,mosen/commandment,mosen/commandment,mosen/commandment,jessepeterson/commandment
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
<commit_before>import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str)...
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str) -> (rsa.RSAPri...
<commit_before>import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509 import NameOID, DNSName def generate_self_signed_certificate(cn: str)...
b0699b4683a241449889ee712ae57bb13f0e3eaa
tests/backends/gstreamer.py
tests/backends/gstreamer.py
import unittest from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCase): uris =...
import unittest import os from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) folder = os.path.dirname(__file__) folder = os.path.join(folder, '..', 'data') folder = os.path.a...
Use actuall mp3s for testing
Use actuall mp3s for testing
Python
apache-2.0
dbrgn/mopidy,SuperStarPL/mopidy,kingosticks/mopidy,adamcik/mopidy,hkariti/mopidy,ali/mopidy,jodal/mopidy,jmarsik/mopidy,rawdlite/mopidy,tkem/mopidy,priestd09/mopidy,abarisain/mopidy,pacificIT/mopidy,vrs01/mopidy,diandiankan/mopidy,quartz55/mopidy,mopidy/mopidy,swak/mopidy,liamw9534/mopidy,mokieyue/mopidy,bencevans/mopi...
import unittest from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCase): uris =...
import unittest import os from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) folder = os.path.dirname(__file__) folder = os.path.join(folder, '..', 'data') folder = os.path.a...
<commit_before>import unittest from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCa...
import unittest import os from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) folder = os.path.dirname(__file__) folder = os.path.join(folder, '..', 'data') folder = os.path.a...
import unittest from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCase): uris =...
<commit_before>import unittest from mopidy.backends.gstreamer import GStreamerBackend from tests.backends.basetests import (BasePlaybackControllerTest, BaseCurrentPlaylistControllerTest) class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCa...
430246e54add2ef99fd3d8e87b05ba4b178e0336
tests/test_subgenerators.py
tests/test_subgenerators.py
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
Use return value in subgenerator test
Use return value in subgenerator test
Python
mit
FichteFoll/resumeback
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
<commit_before>import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenera...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
<commit_before>import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenera...
fea7a2c0e4f4f3da50935d03db4b9e19a0fc477c
shakespearelang/utils.py
shakespearelang/utils.py
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
Use ">>" for indicating next event, fix bug with indexing
Use ">>" for indicating next event, fix bug with indexing
Python
mit
zmbc/shakespearelang,zmbc/shakespearelang,zmbc/shakespearelang
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
<commit_before>def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) ...
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
<commit_before>def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) ...
da097ed41010961cc0814d55d8784787f3ea8a63
skimage/util/arraypad.py
skimage/util/arraypad.py
from __future__ import division, absolute_import, print_function from numpy import pad as numpy_pad def pad(array, pad_width, mode, **kwargs): return numpy_pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = numpy_pad.__doc__
from __future__ import division, absolute_import, print_function import numpy as np def pad(array, pad_width, mode, **kwargs): return np.pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = np.pad.__doc__
Change import structure for doctests
Change import structure for doctests
Python
bsd-3-clause
rjeli/scikit-image,paalge/scikit-image,rjeli/scikit-image,vighneshbirodkar/scikit-image,vighneshbirodkar/scikit-image,vighneshbirodkar/scikit-image,paalge/scikit-image,rjeli/scikit-image,paalge/scikit-image
from __future__ import division, absolute_import, print_function from numpy import pad as numpy_pad def pad(array, pad_width, mode, **kwargs): return numpy_pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = numpy_pad.__doc__ Change import structure for doctests
from __future__ import division, absolute_import, print_function import numpy as np def pad(array, pad_width, mode, **kwargs): return np.pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = np.pad.__doc__
<commit_before>from __future__ import division, absolute_import, print_function from numpy import pad as numpy_pad def pad(array, pad_width, mode, **kwargs): return numpy_pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = numpy_pad.__doc__ <commit_msg>Change import struct...
from __future__ import division, absolute_import, print_function import numpy as np def pad(array, pad_width, mode, **kwargs): return np.pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = np.pad.__doc__
from __future__ import division, absolute_import, print_function from numpy import pad as numpy_pad def pad(array, pad_width, mode, **kwargs): return numpy_pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = numpy_pad.__doc__ Change import structure for doctestsfrom __futu...
<commit_before>from __future__ import division, absolute_import, print_function from numpy import pad as numpy_pad def pad(array, pad_width, mode, **kwargs): return numpy_pad(array, pad_width, mode, **kwargs) # Pull function info / docs from NumPy pad.__doc__ = numpy_pad.__doc__ <commit_msg>Change import struct...
14110deb4d31d27f74d16ff062030ee9dccc221e
multi_schema/middleware.py
multi_schema/middleware.py
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from models import Schema class SchemaMiddleware: def process_request(self, request): ...
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from django.core.exceptions import ObjectDoesNotExist from models import Schema class Schem...
Add some data into the request context. Better handling of missing Schema objects when logging in (should we raise an error?).
Add some data into the request context. Better handling of missing Schema objects when logging in (should we raise an error?).
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from models import Schema class SchemaMiddleware: def process_request(self, request): ...
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from django.core.exceptions import ObjectDoesNotExist from models import Schema class Schem...
<commit_before>""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from models import Schema class SchemaMiddleware: def process_request(sel...
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from django.core.exceptions import ObjectDoesNotExist from models import Schema class Schem...
""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from models import Schema class SchemaMiddleware: def process_request(self, request): ...
<commit_before>""" Middleware to automatically set the schema (namespace). if request.user.is_superuser, then look for a ?schema=XXX and set the schema to that. Otherwise, set the schema to the one associated with the logged in user. """ from models import Schema class SchemaMiddleware: def process_request(sel...
eb90169c2d38244af61e135ed279b8d42f1a8ef5
test/test_sampling.py
test/test_sampling.py
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
Increase test coverage of `profiling.sampling`
Increase test coverage of `profiling.sampling`
Python
bsd-3-clause
sublee/profiling,JeanPaulShapo/profiling,JeanPaulShapo/profiling,what-studio/profiling,sublee/profiling,what-studio/profiling
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
<commit_before># -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.fl...
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
# -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.flaky(reruns=10) ...
<commit_before># -*- coding: utf-8 -*- from __future__ import division import sys import pytest from profiling.sampling import SamplingProfiler from profiling.sampling.samplers import ItimerSampler from utils import find_stats, spin def spin_100ms(): spin(0.1) def spin_500ms(): spin(0.5) @pytest.mark.fl...
504ae635e08ccf0784db0a0586e8796f5bd360bb
test_chatbot_brain.py
test_chatbot_brain.py
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
import chatbot_brain stock = u"What a funny thing to say!" def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 ...
Add test_i_filter_random_words_not_in_lexicon() to assert the stock phrase is returned if all the words are not in the lexicon
Add test_i_filter_random_words_not_in_lexicon() to assert the stock phrase is returned if all the words are not in the lexicon
Python
mit
corinnelhh/chatbot,corinnelhh/chatbot
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
import chatbot_brain stock = u"What a funny thing to say!" def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 ...
<commit_before>import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexico...
import chatbot_brain stock = u"What a funny thing to say!" def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 ...
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
<commit_before>import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexico...
20147b8b8a80ef8ab202d916bf1cdfb67d4753d3
SelfTests.py
SelfTests.py
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
Test of logger is testing an testPhrase instead of two manually writen strings
Test of logger is testing an testPhrase instead of two manually writen strings Signed-off-by: TeaPackCZ <a78d8486eff6e2cb08b2d9907449b92187b8e215@gmail.com>
Python
mit
TeaPackCZ/RobotZed,TeaPackCZ/RobotZed
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
<commit_before>import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check i...
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
<commit_before>import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check i...
0c00acb19274626241f901ea85a124511dfe4526
server/lepton_server.py
server/lepton_server.py
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
Remove third dimension from image array
Remove third dimension from image array
Python
mit
wonkoderverstaendige/raspi_lepton
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
<commit_before>#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folde...
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo fr...
<commit_before>#!/usr/bin/env python import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folde...
822ae0442bf5091be234dc9470a79c83f909ff35
txircd/modules/conn_join.py
txircd/modules/conn_join.py
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
Fix once again nobody being allowed to connect
Fix once again nobody being allowed to connect
Python
bsd-3-clause
Heufneutje/txircd,DesertBus/txircd,ElementalAlchemist/txircd
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
<commit_before>from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in...
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in self.ircd.chan...
<commit_before>from txircd.channel import IRCChannel from txircd.modbase import Module class Autojoin(Module): def joinOnConnect(self, user): if "client_join_on_connect" in self.ircd.servconfig: for channel in self.ircd.servconfig["client_join_on_connect"]: user.join(self.ircd.channels[channel] if channel in...
cb1d686d5d0bb96e5a22f079aca34678167c19b1
tweets/api.py
tweets/api.py
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
Adjust user filter to author, not related
Adjust user filter to author, not related
Python
mit
pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
<commit_before>from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().obje...
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().objects.all() s...
<commit_before>from rest_framework import viewsets, authentication from tweets import models from tweets import serializers from tweets.permissions import MessagePermission, ProfilePermissions from django.contrib.auth import get_user_model class UserViewSet(viewsets.ModelViewSet): queryset = get_user_model().obje...
c498bb6ac7a80ac2668fef22fa6600de6fc9af89
dakota/plugins/base.py
dakota/plugins/base.py
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
Update argument lists for abstract methods
Update argument lists for abstract methods
Python
mit
csdms/dakota,csdms/dakota
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
<commit_before>#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): ...
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): """Define defa...
<commit_before>#! /usr/bin/env python """An abstract base class for all Dakota component plugins.""" from abc import ABCMeta, abstractmethod class PluginBase(object): """Describe features common to all Dakota plugins.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, **kwargs): ...
8ae102a99b4dab4d4b6273eaacd83db7616640c2
api/setup.py
api/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
Revert "Ship all of our examples in the API update tarball."
Revert "Ship all of our examples in the API update tarball." This reverts commit 4162114707f69bcfb6ecea95d7bdf4c080b4b168. (imported from commit a4d68bc2a68209bed8e00e6d58dd5f5d3a3187f9)
Python
apache-2.0
avastu/zulip,brainwane/zulip,eastlhu/zulip,MariaFaBella85/zulip,hayderimran7/zulip,willingc/zulip,jainayush975/zulip,vaidap/zulip,voidException/zulip,alliejones/zulip,jessedhillon/zulip,bowlofstew/zulip,firstblade/zulip,suxinde2009/zulip,zofuthan/zulip,JPJPJPOPOP/zulip,huangkebo/zulip,hayderimran7/zulip,babbage/zulip,M...
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', classifiers=[...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import humbug import glob import os from distutils.core import setup setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', author='Humbug, Inc.', author_email='humbug@humbughq.com', ...
81fa7c857b9c7fc7cf0c48028be22071da5cb318
test/execute-steps.py
test/execute-steps.py
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
Fix test to work with new selenium release
Fix test to work with new selenium release Currently testing needs bleeding edge of lettuce_webdriver which can be installed via pip install -e git+git://github.com/bbangert/lettuce_webdriver.git
Python
bsd-2-clause
cburgmer/deniz,cburgmer/deniz
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
<commit_before># -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') ...
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
# -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') assert_equals...
<commit_before># -*- coding: utf-8 -*- from lettuce import world, step from nose.tools import assert_equals, assert_true @step(u'Then I see no results') def then_i_see_spo_results(step): cell = world.browser.find_element_by_xpath('//*[@id="query_results"]//table[@class="resulttable"]/tbody/tr/td[@colspan="3"]') ...
883ec0d68140995cfedc2d64d7d80cac1e234f39
app/oauth.py
app/oauth.py
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
Revert "Revert "Do not cache discovery""
Revert "Revert "Do not cache discovery"" This reverts commit e8aca80abcf8c309c13360c386b9505a595e1998.
Python
mit
lumapps/lumRest
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
<commit_before># -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(...
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
# -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(email, scopes, ...
<commit_before># -*- coding: utf-8 -*- import logging import httplib2 import json import time import random from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials class OAuth(): __services = dict() @staticmethod def getCredentials(...
1eaae78c14b26378a606221eb61f97ec15134baa
src/gpl/test/simple01-td.py
src/gpl/test/simple01-td.py
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
Remove dead code from test
Remove dead code from test Signed-off-by: Don MacMillen <1f1e67e5fdb25d2e5cd18ddc0fee425272daab56@macmillen.net>
Python
bsd-3-clause
The-OpenROAD-Project/OpenROAD,The-OpenROAD-Project/OpenROAD,The-OpenROAD-Project/OpenROAD,The-OpenROAD-Project/OpenROAD,QuantamHD/OpenROAD,The-OpenROAD-Project/OpenROAD,QuantamHD/OpenROAD,QuantamHD/OpenROAD,QuantamHD/OpenROAD,QuantamHD/OpenROAD
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
<commit_before>from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period ...
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period 2 clk") design...
<commit_before>from openroad import Design, Tech import helpers import gpl_aux tech = Tech() tech.readLiberty("./library/nangate45/NangateOpenCellLibrary_typical.lib") tech.readLef("./nangate45.lef") design = Design(tech) design.readDef("./simple01-td.def") design.evalTclString("create_clock -name core_clock -period ...
d1bd82008c21942dee0ed29ba6d4f9eb54f2af33
issues/signals.py
issues/signals.py
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal(providing_args=('request', 'issue'))
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal() # Provides arguments: ('request', 'issue')
Remove documenting argument from Signal
Remove documenting argument from Signal
Python
mit
6aika/issue-reporting,6aika/issue-reporting,6aika/issue-reporting
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal(providing_args=('request', 'issue')) Remove documenting argument from Signal
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal() # Provides arguments: ('request', 'issue')
<commit_before>from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal(providing_args=('request', 'issue')) <commit_msg>Remove documenting argument from Signal<commit_after>
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal() # Provides arguments: ('request', 'issue')
from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal(providing_args=('request', 'issue')) Remove documenting argument from Signalfrom django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal() # Provides ar...
<commit_before>from django.dispatch import Signal #: Signal fired when a new issue is posted via the API. issue_posted = Signal(providing_args=('request', 'issue')) <commit_msg>Remove documenting argument from Signal<commit_after>from django.dispatch import Signal #: Signal fired when a new issue is posted via the AP...
c36c4e36c5f2ef5f270923172be04d528ad37090
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '44c71d88d9c098ece5dbf3e1fcc93ab87d8193cd' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '7e0bebc8666de8438c5baf4967fdabfc7646b3ed' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
Upgrade libchromiumcontent to fix linking error
Upgrade libchromiumcontent to fix linking error
Python
mit
pombredanne/electron,thompsonemerson/electron,jjz/electron,tonyganch/electron,bobwol/electron,electron/electron,voidbridge/electron,howmuchcomputer/electron,gbn972/electron,Jacobichou/electron,leftstick/electron,wolfflow/electron,jlord/electron,robinvandernoord/electron,eriser/electron,destan/electron,Jonekee/electron,...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '44c71d88d9c098ece5dbf3e1fcc93ab87d8193cd' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '7e0bebc8666de8438c5baf4967fdabfc7646b3ed' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
<commit_before>#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '44c71d88d9c098ece5dbf3e1fcc93ab87d8193cd' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'wi...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '7e0bebc8666de8438c5baf4967fdabfc7646b3ed' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '44c71d88d9c098ece5dbf3e1fcc93ab87d8193cd' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
<commit_before>#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '44c71d88d9c098ece5dbf3e1fcc93ab87d8193cd' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'wi...
85c9206dd0a4af52a31d7b6e9283bc7c103e3953
demos/dlgr/demos/iterated_drawing/models.py
demos/dlgr/demos/iterated_drawing/models.py
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
Fix encoding of source image to work on Python3
Fix encoding of source image to work on Python3
Python
mit
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
<commit_before>import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define t...
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define the contents of ...
<commit_before>import base64 import json import os import random from dallinger.nodes import Source class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "drawing_source"} def _contents(self): """Define t...
0230c94110e99f31aea413230a908bae8cce467d
testfixtures/tests/test_docs.py
testfixtures/tests/test_docs.py
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from os.path import dirname,join,pardir from . import compat def test_suite(): m = doctest.Manue...
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from nose.plugins.skip import SkipTest from os.path import dirname, join, pardir import os from . imp...
Allow docs to test to be found elsewhere. (they're not unpacked by installing the sdist)
Allow docs to test to be found elsewhere. (they're not unpacked by installing the sdist)
Python
mit
nebulans/testfixtures,Simplistix/testfixtures
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from os.path import dirname,join,pardir from . import compat def test_suite(): m = doctest.Manue...
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from nose.plugins.skip import SkipTest from os.path import dirname, join, pardir import os from . imp...
<commit_before># Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from os.path import dirname,join,pardir from . import compat def test_suite(): m =...
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from nose.plugins.skip import SkipTest from os.path import dirname, join, pardir import os from . imp...
# Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from os.path import dirname,join,pardir from . import compat def test_suite(): m = doctest.Manue...
<commit_before># Copyright (c) 2009-2012 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest, capture from manuel.testing import TestSuite from os.path import dirname,join,pardir from . import compat def test_suite(): m =...
18910b6cfa94a88763d2295c4b4644ed099ef382
tests/test_options.py
tests/test_options.py
from av.option import Option from common import * class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') self.assertIs...
from common import * from av.option import Option, OptionTypes as types class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') ...
Fix the one broken test due to OptionType enum.
Fix the one broken test due to OptionType enum.
Python
bsd-3-clause
pupil-labs/PyAV,pupil-labs/PyAV,pupil-labs/PyAV,PyAV-Org/PyAV,pupil-labs/PyAV,mikeboers/PyAV,mikeboers/PyAV,PyAV-Org/PyAV
from av.option import Option from common import * class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') self.assertIs...
from common import * from av.option import Option, OptionTypes as types class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') ...
<commit_before>from av.option import Option from common import * class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') ...
from common import * from av.option import Option, OptionTypes as types class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') ...
from av.option import Option from common import * class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') self.assertIs...
<commit_before>from av.option import Option from common import * class TestOptions(TestCase): def test_mov_options(self): mov = av.ContainerFormat('mov') options = mov.descriptor.options by_name = {opt.name: opt for opt in options} opt = by_name.get('use_absolute_path') ...
35c9740826d2b7636647e45afab4ec87075647a6
timm/utils/metrics.py
timm/utils/metrics.py
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 ...
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ import torch class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 sel...
Fix accuracy when topk > num_classes
Fix accuracy when topk > num_classes
Python
apache-2.0
rwightman/pytorch-image-models,rwightman/pytorch-image-models
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 ...
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ import torch class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 sel...
<commit_before>""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 s...
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ import torch class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 sel...
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 ...
<commit_before>""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 s...
0f35d965b19ce52fc1f3fd633dc9edae0a2e7fe7
tests/test_django_admin/urls.py
tests/test_django_admin/urls.py
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls), )
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls)), )
Fix syntax error in tests
Fix syntax error in tests
Python
isc
trilan/lemon-robots,trilan/lemon-robots
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls), ) Fix syntax error in tests
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls)), )
<commit_before>from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls), ) <commit_msg>Fix syntax error in tests<commit_after>
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls), ) Fix syntax error in testsfrom django.conf.urls import patterns, url, include from django.contrib imp...
<commit_before>from django.conf.urls import patterns, url, include from django.contrib import admin from tests.urls import urlpatterns admin.autodiscover() urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls), ) <commit_msg>Fix syntax error in tests<commit_after>from django.conf.urls import patte...
f935a14967f8b66342d34efca9ceff9eecd384be
app.py
app.py
#!/usr/bin/env python import os from flask import Flask, render_template app = Flask(__name__) @app.route('/') def root(): genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Rap' },\ { 'rank':'2', 'title':'Started from the Bottom',...
#!/usr/bin/env python import os from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Hip Hop' },\ { 'rank':'2', 'title':'Started from the Bottom', ...
Enable submission of new songs via form.
Enable submission of new songs via form.
Python
mit
alykhank/Tunezout,alykhank/Tunezout
#!/usr/bin/env python import os from flask import Flask, render_template app = Flask(__name__) @app.route('/') def root(): genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Rap' },\ { 'rank':'2', 'title':'Started from the Bottom',...
#!/usr/bin/env python import os from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Hip Hop' },\ { 'rank':'2', 'title':'Started from the Bottom', ...
<commit_before>#!/usr/bin/env python import os from flask import Flask, render_template app = Flask(__name__) @app.route('/') def root(): genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Rap' },\ { 'rank':'2', 'title':'Started fr...
#!/usr/bin/env python import os from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Hip Hop' },\ { 'rank':'2', 'title':'Started from the Bottom', ...
#!/usr/bin/env python import os from flask import Flask, render_template app = Flask(__name__) @app.route('/') def root(): genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Rap' },\ { 'rank':'2', 'title':'Started from the Bottom',...
<commit_before>#!/usr/bin/env python import os from flask import Flask, render_template app = Flask(__name__) @app.route('/') def root(): genres = ('Hip Hop', 'Electronic', 'R&B') songs = [\ { 'rank':'1', 'title':'The Motto', 'artist':'Drake', 'year':'2013', 'genre':'Rap' },\ { 'rank':'2', 'title':'Started fr...
c873fa541f58e2c8be35d0854da7d5aa3491267a
src/sentry/status_checks/celery_alive.py
src/sentry/status_checks/celery_alive.py
from __future__ import absolute_import from time import time from sentry import options from .base import StatusCheck, Problem class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:last_worker_ping') or 0 if last_ping >= time() - 300: return [] ...
from __future__ import absolute_import from time import time from django.core.urlresolvers import reverse from sentry import options from sentry.utils.http import absolute_uri from .base import Problem, StatusCheck class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:l...
Add link to queue graphs for `CeleryAliveCheck` result.
Add link to queue graphs for `CeleryAliveCheck` result.
Python
bsd-3-clause
mvaled/sentry,beeftornado/sentry,mvaled/sentry,BuildingLink/sentry,mitsuhiko/sentry,BuildingLink/sentry,mvaled/sentry,fotinakis/sentry,jean/sentry,JamesMura/sentry,alexm92/sentry,zenefits/sentry,mvaled/sentry,mitsuhiko/sentry,jean/sentry,JamesMura/sentry,beeftornado/sentry,JackDanger/sentry,looker/sentry,jean/sentry,lo...
from __future__ import absolute_import from time import time from sentry import options from .base import StatusCheck, Problem class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:last_worker_ping') or 0 if last_ping >= time() - 300: return [] ...
from __future__ import absolute_import from time import time from django.core.urlresolvers import reverse from sentry import options from sentry.utils.http import absolute_uri from .base import Problem, StatusCheck class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:l...
<commit_before>from __future__ import absolute_import from time import time from sentry import options from .base import StatusCheck, Problem class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:last_worker_ping') or 0 if last_ping >= time() - 300: r...
from __future__ import absolute_import from time import time from django.core.urlresolvers import reverse from sentry import options from sentry.utils.http import absolute_uri from .base import Problem, StatusCheck class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:l...
from __future__ import absolute_import from time import time from sentry import options from .base import StatusCheck, Problem class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:last_worker_ping') or 0 if last_ping >= time() - 300: return [] ...
<commit_before>from __future__ import absolute_import from time import time from sentry import options from .base import StatusCheck, Problem class CeleryAliveCheck(StatusCheck): def check(self): last_ping = options.get('sentry:last_worker_ping') or 0 if last_ping >= time() - 300: r...
42cc93590bef8e97c76e79110d2b64906c34690d
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': '' } chatbot_goaloriented = { 'socket_address': '127.0.0.1', 'socket_port': 8889 ...
Add ports and fix bug
Add ports and fix bug
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': '' } chatbot_goaloriented = { 'socket_address': '127.0.0.1', 'socket_port': 8889 ...
<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': '' } chatbot_goaloriented = { 'socket_address': '127.0.0.1', 'socket_port': 8889 ...
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'...
b00cc9aa45a455b187bec869e367422bb78785c1
luigi_td/targets/tableau.py
luigi_td/targets/tableau.py
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
Fix the option name for Tableau server version
Fix the option name for Tableau server version
Python
apache-2.0
treasure-data/luigi-td
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
<commit_before>from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ...
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ssl_verify = 't...
<commit_before>from luigi_td.targets.result import ResultTarget import urllib import logging logger = logging.getLogger('luigi-interface') class TableauServerResultTarget(ResultTarget): # required server = None username = None password = None datasource = None # optional ssl = 'true' ...
779b9223a0e57a00964fa73ce3e164ececfbf4cb
kolibri/deployment/default/settings/test.py
kolibri/deployment/default/settings/test.py
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = True
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = False
Use migrations because `kolibri start` was added to tox matrix
Use migrations because `kolibri start` was added to tox matrix
Python
mit
christianmemije/kolibri,lyw07/kolibri,benjaoming/kolibri,jonboiser/kolibri,benjaoming/kolibri,lyw07/kolibri,learningequality/kolibri,mrpau/kolibri,rtibbles/kolibri,lyw07/kolibri,DXCanas/kolibri,MingDai/kolibri,rtibbles/kolibri,MingDai/kolibri,learningequality/kolibri,MingDai/kolibri,rtibbles/kolibri,jonboiser/kolibri,j...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = True Use migrations because `kolibri start` was added to tox matrix
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = False
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = True <commit_msg>Use migrations because `kolibri start` was added to tox matrix<commit_after>
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = False
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = True Use migrations because `kolibri start` was added to tox matrixfrom __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_...
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa KOLIBRI_SKIP_AUTO_DATABASE_MIGRATION = True <commit_msg>Use migrations because `kolibri start` was added to tox matrix<commit_after>from __future__ import absolute_import, print_function, unicode_litera...
78c13173fadbdc3d261ab3690ffb9c37d8f8a72d
bootstrap.py
bootstrap.py
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
Update to reflect new create_app signature
Update to reflect new create_app signature
Python
mit
openannotation/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,ningyifan/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,happybelly/annotator-store
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
<commit_before>from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the ...
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the required admin ...
<commit_before>from __future__ import print_function from getpass import getpass import readline import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input("This program will perform initial setup of the annotation \n" "store, and create the ...
bf790bb1ad59cca3034715e9e5c92e128bd1902e
apps/users/admin.py
apps/users/admin.py
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user', 'reason') admin.site.reg...
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user__username', 'reason') admi...
Use explicit related-lookup syntax in ban search.
Use explicit related-lookup syntax in ban search.
Python
mpl-2.0
biswajitsahu/kuma,davehunt/kuma,SphinxKnight/kuma,escattone/kuma,yfdyh000/kuma,ronakkhunt/kuma,carnell69/kuma,tximikel/kuma,darkwing/kuma,YOTOV-LIMITED/kuma,SphinxKnight/kuma,safwanrahman/kuma,a2sheppy/kuma,safwanrahman/kuma,MenZil/kuma,tximikel/kuma,bluemini/kuma,SphinxKnight/kuma,whip112/Whip112,biswajitsahu/kuma,ana...
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user', 'reason') admin.site.reg...
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user__username', 'reason') admi...
<commit_before>from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user', 'reason') ...
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user__username', 'reason') admi...
from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user', 'reason') admin.site.reg...
<commit_before>from django.contrib import admin from users.models import UserBan class UserBanAdmin(admin.ModelAdmin): fields = ('user', 'by', 'reason', 'is_active') list_display = ('user', 'by', 'reason') list_filter = ('is_active',) raw_id_fields = ('user',) search_fields = ('user', 'reason') ...
72a5f58d7c7fe18f5ce4c2e02cf8a26146777f27
social/apps/pyramid_app/__init__.py
social/apps/pyramid_app/__init__.py
def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{backend}') config.add_route('social.disconnect_association', '/disconnect/{backend}/{association_...
from social.strategies.utils import set_current_strategy_getter from social.apps.pyramid_app.utils import load_strategy def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{...
Set current strategy on pyramid app
Set current strategy on pyramid app
Python
bsd-3-clause
SeanHayes/python-social-auth,SeanHayes/python-social-auth,JerzySpendel/python-social-auth,ariestiyansyah/python-social-auth,bjorand/python-social-auth,drxos/python-social-auth,tkajtoch/python-social-auth,ByteInternet/python-social-auth,VishvajitP/python-social-auth,lawrence34/python-social-auth,JerzySpendel/python-soci...
def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{backend}') config.add_route('social.disconnect_association', '/disconnect/{backend}/{association_...
from social.strategies.utils import set_current_strategy_getter from social.apps.pyramid_app.utils import load_strategy def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{...
<commit_before>def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{backend}') config.add_route('social.disconnect_association', '/disconnect/{backend...
from social.strategies.utils import set_current_strategy_getter from social.apps.pyramid_app.utils import load_strategy def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{...
def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{backend}') config.add_route('social.disconnect_association', '/disconnect/{backend}/{association_...
<commit_before>def includeme(config): config.add_route('social.auth', '/login/{backend}') config.add_route('social.complete', '/complete/{backend}') config.add_route('social.disconnect', '/disconnect/{backend}') config.add_route('social.disconnect_association', '/disconnect/{backend...
c0a6a18363e3bdaab67c4abb15add441e7a975ca
glaciercmd/command_upload_file_to_vault.py
glaciercmd/command_upload_file_to_vault.py
import boto class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) try: vault = glacier_connection.get_vault(args[5]) ...
import boto import time import os from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_a...
Save archive ids to dynamodb
Save archive ids to dynamodb
Python
mit
carsonmcdonald/glacier-cmd
import boto class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) try: vault = glacier_connection.get_vault(args[5]) ...
import boto import time import os from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_a...
<commit_before>import boto class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) try: vault = glacier_connection.get_...
import boto import time import os from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_a...
import boto class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) try: vault = glacier_connection.get_vault(args[5]) ...
<commit_before>import boto class CommandUploadFileToVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) try: vault = glacier_connection.get_...
f762c4e129db71ef7cfccba9b8e60582a3358617
octane_fuelclient/octaneclient/commands.py
octane_fuelclient/octaneclient/commands.py
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
Call fuelclient directly passing over the object
Call fuelclient directly passing over the object
Python
apache-2.0
Mirantis/octane,stackforge/fuel-octane,Mirantis/octane,stackforge/fuel-octane
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
<commit_before>from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.Env...
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.EnvShow.columns ...
<commit_before>from fuelclient.commands import base from fuelclient.commands import environment as env_commands from fuelclient.common import data_utils class EnvClone(env_commands.EnvMixIn, base.BaseShowCommand): """Clone environment and translate settings to the given release.""" columns = env_commands.Env...
bf9a3b78e2d0da66deee8e8f140ba161d601a4c6
assisstant/keyboard/config.py
assisstant/keyboard/config.py
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 2 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOU...
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 3 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOUT_M...
Increase flashing time from 2 to 3 seconds
Increase flashing time from 2 to 3 seconds
Python
apache-2.0
brainbots/assistant
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 2 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOU...
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 3 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOUT_M...
<commit_before>from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 2 TIME_REST_SEC = 4 ANIMATION_DURATION ...
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 3 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOUT_M...
from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 2 TIME_REST_SEC = 4 ANIMATION_DURATION = 300 GRIDLAYOU...
<commit_before>from PyQt5.QtCore import Qt FREQ = [ 6.666666666666667, # 12.195121951219512, 5.882352941, 10, 7.575757575757576 ] # fifth freq # 8.620689655172415 # # TODO: Adjust colors COLOR = [Qt.green, Qt.green, Qt.green, Qt.green, Qt.black] TIME_FLASH_SEC = 2 TIME_REST_SEC = 4 ANIMATION_DURATION ...
5cc071958aa63f46ec7f3708648f80a8424c661b
Lib/compositor/cmap.py
Lib/compositor/cmap.py
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): cmap = {} cmapIDs = [(3, 10), (0, 3), (3, 1)] for i in range(len(cmapIDs)): if ttFont["cmap"].getcmap(*cmapIDs[i]): cmap = ttFont["cmap"].getcmap(*cmapIDs[i]).cmap break ...
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): for platformID, encodingID in [(3, 10), (0, 3), (3, 1)]: cmapSubtable = ttFont["cmap"].getcmap(platformID, encodingID) if cmapSubtable is not None: return cmapSubtable.cmap from ...
Make the code more compact
Make the code more compact
Python
mit
typesupply/compositor,anthrotype/compositor,anthrotype/compositor,typesupply/compositor
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): cmap = {} cmapIDs = [(3, 10), (0, 3), (3, 1)] for i in range(len(cmapIDs)): if ttFont["cmap"].getcmap(*cmapIDs[i]): cmap = ttFont["cmap"].getcmap(*cmapIDs[i]).cmap break ...
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): for platformID, encodingID in [(3, 10), (0, 3), (3, 1)]: cmapSubtable = ttFont["cmap"].getcmap(platformID, encodingID) if cmapSubtable is not None: return cmapSubtable.cmap from ...
<commit_before>""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): cmap = {} cmapIDs = [(3, 10), (0, 3), (3, 1)] for i in range(len(cmapIDs)): if ttFont["cmap"].getcmap(*cmapIDs[i]): cmap = ttFont["cmap"].getcmap(*cmapIDs[i]).cmap ...
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): for platformID, encodingID in [(3, 10), (0, 3), (3, 1)]: cmapSubtable = ttFont["cmap"].getcmap(platformID, encodingID) if cmapSubtable is not None: return cmapSubtable.cmap from ...
""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): cmap = {} cmapIDs = [(3, 10), (0, 3), (3, 1)] for i in range(len(cmapIDs)): if ttFont["cmap"].getcmap(*cmapIDs[i]): cmap = ttFont["cmap"].getcmap(*cmapIDs[i]).cmap break ...
<commit_before>""" Utilities for handling the cmap table and character mapping in general. """ def extractCMAP(ttFont): cmap = {} cmapIDs = [(3, 10), (0, 3), (3, 1)] for i in range(len(cmapIDs)): if ttFont["cmap"].getcmap(*cmapIDs[i]): cmap = ttFont["cmap"].getcmap(*cmapIDs[i]).cmap ...
3cb52b94d2b5b3376a5dd965a976c398cd835e6d
docs/examples/schema4.py
docs/examples/schema4.py
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { "examples": [ { "name": "John Doe", "age": 25, } ] } print(Person.schema()) # {'title...
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { 'examples': [ { 'name': 'John Doe', 'age': 25, } ] } print(Person.schema()) # {'title...
Fix double quotes to single quotes
Fix double quotes to single quotes
Python
mit
samuelcolvin/pydantic,samuelcolvin/pydantic
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { "examples": [ { "name": "John Doe", "age": 25, } ] } print(Person.schema()) # {'title...
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { 'examples': [ { 'name': 'John Doe', 'age': 25, } ] } print(Person.schema()) # {'title...
<commit_before>from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { "examples": [ { "name": "John Doe", "age": 25, } ] } print(Person.sche...
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { 'examples': [ { 'name': 'John Doe', 'age': 25, } ] } print(Person.schema()) # {'title...
from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { "examples": [ { "name": "John Doe", "age": 25, } ] } print(Person.schema()) # {'title...
<commit_before>from pydantic import BaseModel class Person(BaseModel): name: str age: int class Config: schema_extra = { "examples": [ { "name": "John Doe", "age": 25, } ] } print(Person.sche...
25b5f88d5105ed1b9a2e39b8bea7238709238fd0
shakyo/consolekit/__init__.py
shakyo/consolekit/__init__.py
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
Remove an extra blank line
Remove an extra blank line
Python
unlicense
raviqqe/shakyo
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
<commit_before>import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line....
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line._ASCIIZE = asci...
<commit_before>import curses from .character import Character from .console import Console from .line import Line from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \ is_printable_char, ctrl, unctrl def turn_on_console(asciize=False, spaces_per_tab=4, background_rgb=(0, 0, 0)): Line....
6cd9b0c731839a75cd8e8bd2ab1e5d2f2687c96a
shirka/responders/__init__.py
shirka/responders/__init__.py
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
Remove import for graphite responder
Remove import for graphite responder
Python
mit
rande/python-shirka,rande/python-shirka
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
<commit_before># vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() cla...
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
# vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() class Response(obj...
<commit_before># vim: set fileencoding=utf-8 : class Responder(object): def support(message): pass def generate(message): pass def on_start(self, consumer): return False def support(self, request): return request.content[0:len(self.name())] == self.name() cla...
9b79f940806dbcd7a7326c955b2bc3bbd47892ea
test_results/plot_all.py
test_results/plot_all.py
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot(num_plots, 1, count) ...
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() plt.suptitle(file) num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot...
Add test name to plot as title, maximize plot window
Add test name to plot as title, maximize plot window
Python
agpl-3.0
BrewPi/firmware,BrewPi/firmware,glibersat/firmware,BrewPi/firmware,etk29321/firmware,BrewPi/firmware,BrewPi/firmware,BrewPi/firmware,glibersat/firmware,etk29321/firmware,etk29321/firmware,etk29321/firmware,glibersat/firmware,glibersat/firmware,BrewPi/firmware,glibersat/firmware,etk29321/firmware,glibersat/firmware,glib...
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot(num_plots, 1, count) ...
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() plt.suptitle(file) num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot...
<commit_before>import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot(num_plot...
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() plt.suptitle(file) num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot...
import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot(num_plots, 1, count) ...
<commit_before>import glob import csv import numpy as np import matplotlib.pyplot as plt for file in glob.glob("*.csv"): data = np.genfromtxt(file, delimiter = ',', names = True) plt.figure() num_plots = len(data.dtype.names) count = 1 for col_name in data.dtype.names: plt.subplot(num_plot...
e5c436dfc39f38007c1cf8ee5e42a2e33e71740c
tests/test_base_utils.py
tests/test_base_utils.py
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
Comment out failing check. See GH-199.
Comment out failing check. See GH-199.
Python
mit
TeamHG-Memex/eli5,TeamHG-Memex/eli5,TeamHG-Memex/eli5
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
<commit_before>import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' asser...
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' assert y_attr.name =...
<commit_before>import attr import pytest from eli5.base_utils import attrs def test_attrs_with_default(): @attrs class WithDefault(object): def __init__(self, x, y=1): self.x = x self.y = y x_attr, y_attr = attr.fields(WithDefault) assert x_attr.name == 'x' asser...
601b35c2ad07d7927c9473c6cbf500d1fec3e307
tests/test_invariants.py
tests/test_invariants.py
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
Rename encode/decode parameterization in test
Rename encode/decode parameterization in test
Python
mit
lidatong/dataclasses-json,lidatong/dataclasses-json
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
<commit_before>from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities ...
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities import (DataCla...
<commit_before>from collections import deque from hypothesis import given from hypothesis.strategies import (frozensets, integers, lists, one_of, sets, tuples) from tests.hypothesis2 import examples from tests.hypothesis2.strategies import deques, optionals from tests.test_entities ...
cd8407831091d169677d278d3ad9b5b92600b30a
generator/generator.py
generator/generator.py
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
Fix exception handling syntax error
Fix exception handling syntax error
Python
apache-2.0
HappyRay/php-di-generator
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
<commit_before>""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(...
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(class_list_def)...
<commit_before>""" Main class for doing the work. """ from helper import Helper from renderer import Renderer class Generator(object): @classmethod def generate_statements(cls, class_list_def): """ :type class_list_def: str """ class_def_list = Helper.parse_definition_string(...
cbb59747af48ae60473f27b6de976a08a741ab54
tests/test_test_utils.py
tests/test_test_utils.py
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] @classm...
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] cls....
Add test for parameter_space ordering.
TEST: Add test for parameter_space ordering.
Python
apache-2.0
magne-max/zipline-ja,florentchandelier/zipline,Scapogo/zipline,florentchandelier/zipline,bartosh/zipline,wilsonkichoi/zipline,bartosh/zipline,alphaBenj/zipline,wilsonkichoi/zipline,humdings/zipline,humdings/zipline,umuzungu/zipline,alphaBenj/zipline,enigmampc/catalyst,enigmampc/catalyst,magne-max/zipline-ja,quantopian/...
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] @classm...
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] cls....
<commit_before>""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = ...
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] cls....
""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = [] @classm...
<commit_before>""" Tests for our testing utilities. """ from itertools import product from unittest import TestCase from zipline.utils.test_utils import parameter_space class TestParameterSpace(TestCase): x_args = [1, 2] y_args = [3, 4] @classmethod def setUpClass(cls): cls.xy_invocations = ...
ce7d3e1da44d9f33474684db674f3a7660587320
source/services/rotten_tomatoes_service.py
source/services/rotten_tomatoes_service.py
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
Add character replacements for RT search
Add character replacements for RT search
Python
mit
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
<commit_before>import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = se...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = self.__URL + self...
<commit_before>import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class RottenTomatoesService: __URL = 'http://www.rottentomatoes.com/m/' __SEPERATOR = '_' def __init__(self, title): self.title = title def get_rt_rating(self): search_url = se...
494b628ab57c38335368a1b7a2734c7abafc5277
buildcert.py
buildcert.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request for request in Request.query.filter(Request.generation_date == None).all(): # noqa prompt = "Do you want to generate a certificate for {}, {} ?" print(prompt.format(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request from flask import Flask, render_template from flask_mail import Mail, Message def mail_certificate(id, email): msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca...
Add mail_certificate which sends email with flask-mail
Add mail_certificate which sends email with flask-mail Replace COMMAND_MAIL. Send certs from /etc/openvpn/client/ Use template /templates/mail.txt
Python
mit
freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request for request in Request.query.filter(Request.generation_date == None).all(): # noqa prompt = "Do you want to generate a certificate for {}, {} ?" print(prompt.format(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request from flask import Flask, render_template from flask_mail import Mail, Message def mail_certificate(id, email): msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request for request in Request.query.filter(Request.generation_date == None).all(): # noqa prompt = "Do you want to generate a certificate for {}, {} ?" print...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request from flask import Flask, render_template from flask_mail import Mail, Message def mail_certificate(id, email): msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request for request in Request.query.filter(Request.generation_date == None).all(): # noqa prompt = "Do you want to generate a certificate for {}, {} ?" print(prompt.format(...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from subprocess import call from ca import app, db from ca.models import Request for request in Request.query.filter(Request.generation_date == None).all(): # noqa prompt = "Do you want to generate a certificate for {}, {} ?" print...
b4f4226d153e993888f6e7429dcc9aca480e680e
owners_client.py
owners_client.py
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a repository both...
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import owners class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a ...
Implement ListOwnersForFile for Depot Tools
[owners] Implement ListOwnersForFile for Depot Tools Add DepotToolsClient to implement the OwnersClient API for Depot Tools, and implement the ListOwnersForFile method. Change-Id: I933a262898439d879c919d695aa62d7702b4c9a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2530509 Aut...
Python
bsd-3-clause
CoherentLabs/depot_tools,CoherentLabs/depot_tools
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a repository both...
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import owners class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a ...
<commit_before># Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a ...
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import owners class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a ...
# Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a repository both...
<commit_before># Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OwnersClient(object): """Interact with OWNERS files in a repository. This class allows you to interact with OWNERS files in a ...
98988373899da3541f084e4c893628f028200d8c
PunchCard.py
PunchCard.py
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = int(inSplit[0]) minuteIn = int(inSplit[1]) hourOut = int(outSplit[0]) minuteOut = int(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + 24) - ho...
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = float(inSplit[0]) minuteIn = float(inSplit[1]) hourOut = float(outSplit[0]) minuteOut = float(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + ...
Fix type casts and incorrect numbers
Fix type casts and incorrect numbers Replaced int casts to float casts to eliminate need for recasting to float. Was resetting dayHours to 0 when it should have been 0.0 and if hourIn was bigger than hourOut it was adding 24 when it should have been adding 12.
Python
mit
NLSteveO/PunchCard,NLSteveO/PunchCard
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = int(inSplit[0]) minuteIn = int(inSplit[1]) hourOut = int(outSplit[0]) minuteOut = int(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + 24) - ho...
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = float(inSplit[0]) minuteIn = float(inSplit[1]) hourOut = float(outSplit[0]) minuteOut = float(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + ...
<commit_before>import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = int(inSplit[0]) minuteIn = int(inSplit[1]) hourOut = int(outSplit[0]) minuteOut = int(outSplit[1]) if hourIn > hourOut: newHour = (hou...
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = float(inSplit[0]) minuteIn = float(inSplit[1]) hourOut = float(outSplit[0]) minuteOut = float(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + ...
import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = int(inSplit[0]) minuteIn = int(inSplit[1]) hourOut = int(outSplit[0]) minuteOut = int(outSplit[1]) if hourIn > hourOut: newHour = (hourOut + 24) - ho...
<commit_before>import fileinput weekHours = 0.0 dayHours = 0.0 def calcWorkTime(timeIn, timeOut): inSplit = timeIn.split(':') outSplit = timeOut.split(':') hourIn = int(inSplit[0]) minuteIn = int(inSplit[1]) hourOut = int(outSplit[0]) minuteOut = int(outSplit[1]) if hourIn > hourOut: newHour = (hou...
70245be1a4fbb22d20459383136887f0a9cc2ad4
passwd_change.py
passwd_change.py
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
Add log file for deleted lines.
Add log file for deleted lines.
Python
mit
maxsocl/oldmailer
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
<commit_before>#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
<commit_before>#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
68a40f909294c5e2ad6c6bce9f6b7a970d133d21
conanfile.py
conanfile.py
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
Copy find modules to root of module path
conan: Copy find modules to root of module path
Python
mit
polysquare/iwyu-target-cmake,polysquare/include-what-you-use-target-cmake
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
<commit_before>from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@...
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@smspillaz/cmake...
<commit_before>from conans import ConanFile from conans.tools import download, unzip import os VERSION = "0.0.2" class IWYUCTargetCmakeConan(ConanFile): name = "iwyu-target-cmake" version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION) generators = "cmake" requires = ("cmake-include-guard/master@...
52aeb0d37aa903c0189416bbafc2a75ea41f3201
slave/skia_slave_scripts/do_skps_capture.py
slave/skia_slave_scripts/do_skps_capture.py
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
Clean up any left over browser processes in the RecreateSKPs buildstep.
Clean up any left over browser processes in the RecreateSKPs buildstep. BUG=skia:2055 R=borenet@google.com Review URL: https://codereview.chromium.org/140003003
Python
bsd-3-clause
google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Ti...
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
<commit_before>#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from ut...
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from utils import shel...
<commit_before>#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import sys from build_step import BuildStep from ut...
957b623ee36aaae7696cdfcbe33bafcd5cd8a42d
ai_genome.py
ai_genome.py
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
Change a couple of defaults
Change a couple of defaults
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
<commit_before> class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, ...
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, "narrowing"...
<commit_before> class GenomeException(Exception): pass class Genome(object): def __init__(self, name): defaults = { "name": name, "use_openings_book": True, # Search params "max_depth": 6, "max_depth_boost": 0, "mmpdl": 9, ...
5adc4a0637b31de518b30bbc662c3d50bc523a5a
airtravel.py
airtravel.py
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
Add seating plan to aircraft
Add seating plan to aircraft
Python
mit
kentoj/python-fundamentals
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
<commit_before>"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) ...
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) if not (numb...
<commit_before>"""Model for aircraft flights""" class Flight: def __init__(self, number): if not number[:4].isalpha(): raise ValueError("No airline code in '{}'".format(number)) if not number[:4].isupper(): raise ValueError("Invalid airline code'{}'".format(number)) ...
36f59422fdf9d7dc76c31b096c3b7f909762109a
Lib/compiler/syntax.py
Lib/compiler/syntax.py
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
Stop looping to do nothing, just pass.
Stop looping to do nothing, just pass.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
<commit_before>"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detec...
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. """ ...
<commit_before>"""Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detec...
6d6e83734d0cb034f8fc198df94bc64cf412d8d6
ceam/framework/components.py
ceam/framework/components.py
from importlib import import_module import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components configuration type: {}".format(path)) ...
from importlib import import_module from collections import Iterable import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components config...
Add support for component initialization that returns lists
Add support for component initialization that returns lists
Python
bsd-3-clause
ihmeuw/vivarium
from importlib import import_module import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components configuration type: {}".format(path)) ...
from importlib import import_module from collections import Iterable import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components config...
<commit_before>from importlib import import_module import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components configuration type: {}"....
from importlib import import_module from collections import Iterable import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components config...
from importlib import import_module import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components configuration type: {}".format(path)) ...
<commit_before>from importlib import import_module import json def read_component_configuration(path): if path.endswith('.json'): with open(path) as f: config = json.load(f) return apply_defaults(config) else: raise ValueError("Unknown components configuration type: {}"....
80f046bc851916de05ba90e4dc88b78043961061
inventory.py
inventory.py
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
Comment out login system for debugging
Comment out login system for debugging
Python
mit
lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
<commit_before>from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model):...
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model): idNumber = In...
<commit_before>from flask import Flask, render_template, url_for, redirect from flask import session, escape, request from peewee import * #from datetime import date app = Flask(__name__) # http://docs.peewee-orm.com/en/latest/peewee/quickstart.html database = SqliteDatabase('developmentData.db') class Device(Model):...
cf822ee4994915cf178c6e603e3cc8726cf7fb82
api/locations/views.py
api/locations/views.py
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
Send whole location object over websocket
Send whole location object over websocket
Python
mit
Proj-P/project-p-api,Proj-P/project-p-api
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.a...
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
# -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.auth import requ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 Steven Oud. All rights reserved. # Use of this source code is governed by a MIT-style license that can be found # in the LICENSE file. from flask import jsonify, Blueprint, abort, request from .models import Location from api.tokens.models import Token from api.a...
836fd354037a6aca6898b41a9d62ada31f1ee6ba
rasterio/tool.py
rasterio/tool.py
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
Print the banner in IPython
Print the banner in IPython
Python
bsd-3-clause
clembou/rasterio,brendan-ward/rasterio,kapadia/rasterio,clembou/rasterio,njwilson23/rasterio,perrygeo/rasterio,brendan-ward/rasterio,perrygeo/rasterio,youngpm/rasterio,johanvdw/rasterio,clembou/rasterio,kapadia/rasterio,njwilson23/rasterio,perrygeo/rasterio,youngpm/rasterio,brendan-ward/rasterio,njwilson23/rasterio,joh...
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
<commit_before> import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of function...
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of functions for use in th...
<commit_before> import code import collections import logging import sys try: import matplotlib.pyplot as plt except ImportError: plt = None import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) # Collect dictionary of function...
c4803aca65f05d30285c6b7cad0571cd4baa599b
generator/test/runner.py
generator/test/runner.py
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
Add a line that was removed by mistake
Add a line that was removed by mistake
Python
bsd-3-clause
smartdevicelink/sdl_android
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
<commit_before>#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[...
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[1].as_posix()) ...
<commit_before>#!/usr/bin/env python3 """ Main entry point to run all tests """ import sys from pathlib import Path from unittest import TestLoader, TestSuite, TextTestRunner PATH = Path(__file__).absolute() sys.path.append(PATH.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix()) sys.path.append(PATH.parents[...
5a6b19f956dfde65a1d8316fd4bebe4697846e45
connman_dispatcher/detect.py
connman_dispatcher/detect.py
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
Use .state instead of .is_online to keep internal state
Use .state instead of .is_online to keep internal state
Python
isc
a-sk/connman-dispatcher
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
<commit_before>import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_arg...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
<commit_before>import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_arg...
cc92850fd6ebe5adc4064df1956377bb4f9aa30c
pyslicer/url_resources.py
pyslicer/url_resources.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
Correct endpoint for result and score
Correct endpoint for result and score
Python
mit
SlicingDice/slicingdice-python
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" Q...
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" QUERY_AGGREGATIO...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- class URLResources(object): PROJECT = "/project/" FIELD = "/field/" INDEX = "/index/" QUERY_COUNT_ENTITY = "/query/count/entity/" QUERY_COUNT_ENTITY_TOTAL = "/query/count/entity/total/" QUERY_COUNT_EVENT = "/query/count/event/" Q...
df6cba06091132065dcbc571fa48a84cb5b11775
project_fish/whats_fresh/tests/test_image_model.py
project_fish/whats_fresh/tests/test_image_model.py
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
Change id field unicode string to ascii string
Change id field unicode string to ascii string
Python
apache-2.0
osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
<commit_before>from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): ...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): self.exp...
<commit_before>from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): ...
7b9ba8634c0a02cb4c82313d9bef3197640c3187
pyqtgraph/graphicsItems/tests/test_PlotDataItem.py
pyqtgraph/graphicsItems/tests/test_PlotDataItem.py
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
Add test_setData() for PlotDataItem class
Add test_setData() for PlotDataItem class
Python
mit
campagnola/acq4,pbmanis/acq4,meganbkratz/acq4,acq4/acq4,meganbkratz/acq4,acq4/acq4,pbmanis/acq4,acq4/acq4,pbmanis/acq4,meganbkratz/acq4,acq4/acq4,meganbkratz/acq4,campagnola/acq4,campagnola/acq4,pbmanis/acq4,campagnola/acq4
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
<commit_before>import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, ...
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, 1, 1001) y ...
<commit_before>import numpy as np import pyqtgraph as pg pg.mkQApp() def test_fft(): f = 20. x = np.linspace(0, 1, 1000) y = np.sin(2 * np.pi * f * x) pd = pg.PlotDataItem(x, y) pd.setFftMode(True) x, y = pd.getData() assert abs(x[np.argmax(y)] - f) < 0.03 x = np.linspace(0, ...
1973c68a623557380b07b9a09e4bc194e546655e
buildings.py
buildings.py
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
Set Town Hall pop time to 2 minutes instead of 5.
Set Town Hall pop time to 2 minutes instead of 5.
Python
mpl-2.0
chrisnorman7/pyrts,chrisnorman7/pyrts,chrisnorman7/pyrts
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
<commit_before>"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Facto...
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Factory(list)) ...
<commit_before>"""Game buildings.""" from attr import attrs, attrib, Factory from objects import ObjectWithHP, TYPE_BUILDING from mobiles import mobile_types @attrs class GameBuilding(ObjectWithHP): """A building in the game.""" # Mobiles this building produces: provides = attrib(default=Facto...
5e7d73215d17aa52b6aae4dbb1d8e369d785b31d
api/base/exceptions.py
api/base/exceptions.py
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
Use list comprehensions to format all errors where message is not a dict
Use list comprehensions to format all errors where message is not a dict
Python
apache-2.0
SSJohns/osf.io,haoyuchen1992/osf.io,felliott/osf.io,danielneis/osf.io,icereval/osf.io,samchrisinger/osf.io,sloria/osf.io,ZobairAlijan/osf.io,mluke93/osf.io,alexschiller/osf.io,ticklemepierce/osf.io,GageGaskins/osf.io,acshi/osf.io,CenterForOpenScience/osf.io,HalcyonChimera/osf.io,doublebits/osf.io,njantrania/osf.io,kch8...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django ...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django ...
53aecfed27a01ea3ae44f87e9223260c735c82c6
apps/reviews/models.py
apps/reviews/models.py
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
Update reviews model for new added field in 5.5
Update reviews model for new added field in 5.5
Python
bsd-3-clause
Prashant-Surya/addons-server,andymckay/zamboni,elysium001/zamboni,eviljeff/zamboni,eviljeff/zamboni,lavish205/olympia,psiinon/addons-server,mozilla/olympia,andymckay/olympia,wagnerand/addons-server,tsl143/zamboni,kumar303/olympia,andymckay/addons-server,jbalogh/zamboni,wagnerand/zamboni,crdoconnor/olympia,Revanth47/add...
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
<commit_before>import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = model...
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = models.ForeignKey('s...
<commit_before>import itertools from django.db import models import amo from translations.fields import TranslatedField from translations.models import Translation class Review(amo.ModelBase): version = models.ForeignKey('versions.Version') user = models.ForeignKey('users.UserProfile') reply_to = model...
b30be4ee2a9e7c656e78fd34c9b59a1653bed1a2
argonauts/testutils.py
argonauts/testutils.py
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
Test requests don't have a charset attribute
Test requests don't have a charset attribute
Python
bsd-2-clause
fusionbox/django-argonauts
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
<commit_before>import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(...
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(JsonTestClient,...
<commit_before>import json import functools from django.conf import settings from django.test import Client, TestCase __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase'] class JsonTestClient(Client): def _json_request(self, method, url, data=None, *args, **kwargs): method_func = getattr(super(...
d3ee9e437d8fb0b35a5eb2df4ad0c2ba5127f39b
chainer/functions/activation/selu.py
chainer/functions/activation/selu.py
from chainer.functions.activation.elu import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \...
from chainer.functions.activation import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \\lam...
Stop directly importing non-module symbol
Stop directly importing non-module symbol
Python
mit
hvy/chainer,niboshi/chainer,pfnet/chainer,kashif/chainer,ktnyt/chainer,jnishi/chainer,chainer/chainer,ronekko/chainer,wkentaro/chainer,hvy/chainer,wkentaro/chainer,chainer/chainer,wkentaro/chainer,rezoo/chainer,tkerola/chainer,okuta/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,...
from chainer.functions.activation.elu import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \...
from chainer.functions.activation import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \\lam...
<commit_before>from chainer.functions.activation.elu import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: ...
from chainer.functions.activation import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \\lam...
from chainer.functions.activation.elu import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: f(x) = \...
<commit_before>from chainer.functions.activation.elu import elu def selu(x, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946): """Scaled Exponential Linear Unit function. For parameters :math:`\\alpha` and :math:`\\lambda`, it is expressed as .. math:: ...
347681637c7c9d28ba1c787bb77da1296a02d13f
ckanext/archiver/default_settings.py
ckanext/archiver/default_settings.py
# path to ckan config file CKAN_CONFIG = '/home/okfn/pyenv/src/ckan/ckan.ini' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Use this user name when requesting data from ckan ARCHIVE_USER = u'okfn_maintenance' # Max content-length of archived files, larger files will be ignored MAX_CONTENT_LE...
# URL to the CKAN instance CKAN_URL = 'http://127.0.0.1:5000' # API key for the CKAN user that the archiver will authenticate as. # This user must be a system administrator API_KEY = '' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Max content-length of archived files, larger files will be i...
Change settings to use API key and CKAN URL
Change settings to use API key and CKAN URL
Python
mit
ckan/ckanext-archiver,ckan/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,ckan/ckanext-archiver,datagovuk/ckanext-archiver,datagovuk/ckanext-archiver,datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver
# path to ckan config file CKAN_CONFIG = '/home/okfn/pyenv/src/ckan/ckan.ini' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Use this user name when requesting data from ckan ARCHIVE_USER = u'okfn_maintenance' # Max content-length of archived files, larger files will be ignored MAX_CONTENT_LE...
# URL to the CKAN instance CKAN_URL = 'http://127.0.0.1:5000' # API key for the CKAN user that the archiver will authenticate as. # This user must be a system administrator API_KEY = '' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Max content-length of archived files, larger files will be i...
<commit_before># path to ckan config file CKAN_CONFIG = '/home/okfn/pyenv/src/ckan/ckan.ini' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Use this user name when requesting data from ckan ARCHIVE_USER = u'okfn_maintenance' # Max content-length of archived files, larger files will be ignored...
# URL to the CKAN instance CKAN_URL = 'http://127.0.0.1:5000' # API key for the CKAN user that the archiver will authenticate as. # This user must be a system administrator API_KEY = '' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Max content-length of archived files, larger files will be i...
# path to ckan config file CKAN_CONFIG = '/home/okfn/pyenv/src/ckan/ckan.ini' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Use this user name when requesting data from ckan ARCHIVE_USER = u'okfn_maintenance' # Max content-length of archived files, larger files will be ignored MAX_CONTENT_LE...
<commit_before># path to ckan config file CKAN_CONFIG = '/home/okfn/pyenv/src/ckan/ckan.ini' # directory to save downloaded files to ARCHIVE_DIR = '/tmp/archive' # Use this user name when requesting data from ckan ARCHIVE_USER = u'okfn_maintenance' # Max content-length of archived files, larger files will be ignored...
8da134823a56567e09a09aefc44837a837644912
ddcz/urls.py
ddcz/urls.py
from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail,...
from django.urls import path from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ path('', RedirectView.as_view(url='aktuality/', permanent=True)), path('aktuality/', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, ...
Put news on non-root path for clarity
Put news on non-root path for clarity
Python
mit
dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard
from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail,...
from django.urls import path from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ path('', RedirectView.as_view(url='aktuality/', permanent=True)), path('aktuality/', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, ...
<commit_before>from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_...
from django.urls import path from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ path('', RedirectView.as_view(url='aktuality/', permanent=True)), path('aktuality/', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, ...
from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail,...
<commit_before>from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_...
a103968558963c032db7294ed15560429861550d
django_filepicker/widgets.py
django_filepicker/widgets.py
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = 1 JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) if hasattr(settings, 'FILEPICKER_INPUT_TYPE'): INPUT_TYPE = settings.FILEPICKER_INPUT_TYPE else: INPUT_TYP...
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = getattr(settings, "FILEPICKER_JS_VERSION", 0) JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) INPUT_TYPE = getattr(settings, "FILEPICKER_INPUT_TYPE", "filepicker-dr...
Allow Filepicker JS version to be configured
Allow Filepicker JS version to be configured Filepicker JS version can now be configured using FILEPICKER_JS_VERSION. Version 0 is default. Changed the logic of INPUT_TYPE to use getattr instead of hasattr and an if statement.
Python
mit
filepicker/filepicker-django,filepicker/filepicker-django,FundedByMe/filepicker-django,FundedByMe/filepicker-django
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = 1 JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) if hasattr(settings, 'FILEPICKER_INPUT_TYPE'): INPUT_TYPE = settings.FILEPICKER_INPUT_TYPE else: INPUT_TYP...
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = getattr(settings, "FILEPICKER_JS_VERSION", 0) JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) INPUT_TYPE = getattr(settings, "FILEPICKER_INPUT_TYPE", "filepicker-dr...
<commit_before>from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = 1 JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) if hasattr(settings, 'FILEPICKER_INPUT_TYPE'): INPUT_TYPE = settings.FILEPICKER_INPUT_TYPE else...
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = getattr(settings, "FILEPICKER_JS_VERSION", 0) JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) INPUT_TYPE = getattr(settings, "FILEPICKER_INPUT_TYPE", "filepicker-dr...
from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = 1 JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) if hasattr(settings, 'FILEPICKER_INPUT_TYPE'): INPUT_TYPE = settings.FILEPICKER_INPUT_TYPE else: INPUT_TYP...
<commit_before>from django.conf import settings from django.forms import widgets #JS_URL is the url to the filepicker.io javascript library JS_VERSION = 1 JS_URL = "//api.filepicker.io/v%d/filepicker.js" % (JS_VERSION) if hasattr(settings, 'FILEPICKER_INPUT_TYPE'): INPUT_TYPE = settings.FILEPICKER_INPUT_TYPE else...
7a3a1ffc6c153e4ea867988d12725f92d133ffc4
js2py/internals/seval.py
js2py/internals/seval.py
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def eval_js_vm(js): a = By...
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def get_js_bytecode(js): a ...
Add a function returning js bytecode.
Add a function returning js bytecode.
Python
mit
PiotrDabkowski/Js2Py,PiotrDabkowski/Js2Py,PiotrDabkowski/Js2Py
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def eval_js_vm(js): a = By...
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def get_js_bytecode(js): a ...
<commit_before>import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def eval_js_vm(...
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def get_js_bytecode(js): a ...
import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def eval_js_vm(js): a = By...
<commit_before>import pyjsparser from space import Space import fill_space from byte_trans import ByteCodeGenerator from code import Code from simplex import MakeError import sys sys.setrecursionlimit(100000) pyjsparser.parser.ENABLE_JS2PY_ERRORS = lambda msg: MakeError(u'SyntaxError', unicode(msg)) def eval_js_vm(...
2ceb4f7195220d52ce92156da9332b50369fb746
bluesnap/exceptions.py
bluesnap/exceptions.py
class APIError(Exception): pass class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass
class APIError(Exception): def __init__(self, messages): self.messages = messages def __str__(self): import json return json.dumps(self.messages, indent=2) class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass
Return formatted messages in APIError
Return formatted messages in APIError
Python
mit
justyoyo/bluesnap-python,kowito/bluesnap-python,justyoyo/bluesnap-python,kowito/bluesnap-python
class APIError(Exception): pass class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass Return formatted messages in APIError
class APIError(Exception): def __init__(self, messages): self.messages = messages def __str__(self): import json return json.dumps(self.messages, indent=2) class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass
<commit_before>class APIError(Exception): pass class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass <commit_msg>Return formatted messages in APIError<commit_after>
class APIError(Exception): def __init__(self, messages): self.messages = messages def __str__(self): import json return json.dumps(self.messages, indent=2) class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass
class APIError(Exception): pass class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass Return formatted messages in APIErrorclass APIError(Exception): def __init__(self, messages): self.messages = messages def __str__(self): import json return...
<commit_before>class APIError(Exception): pass class ImproperlyConfigured(Exception): pass class ValidationError(Exception): pass <commit_msg>Return formatted messages in APIError<commit_after>class APIError(Exception): def __init__(self, messages): self.messages = messages def __str__(...
0b122d1d4223844c1e53ce68b00a0cdb1e360573
docs/conf.py
docs/conf.py
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] html_ti...
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' author = 'lamby' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte...
Add author to latex_documents to fix sphinx build
Add author to latex_documents to fix sphinx build
Python
bsd-3-clause
lamby/django-slack
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] html_ti...
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' author = 'lamby' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte...
<commit_before>import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inters...
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' author = 'lamby' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte...
import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] html_ti...
<commit_before>import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from django.conf import settings settings.configure() project = 'django-slack' version = '' release = '' copyright = '2014, 2015 Chris Lamb' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inters...