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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5834127e59b1da93bd814575cd7cbba391e253c8 | run_borealis.py | run_borealis.py | from borealis import BotBorealis
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. All systems functional.")
print("Starting BORE... | from borealis import BotBorealis
import time
while True:
bot = None
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. ... | Implement recovery Bot will now automatically restart after an exception is caught. | Implement recovery
Bot will now automatically restart after an exception is caught.
| Python | agpl-3.0 | Aurorastation/BOREALISbot2 | from borealis import BotBorealis
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. All systems functional.")
print("Starting BORE... | from borealis import BotBorealis
import time
while True:
bot = None
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. ... | <commit_before>from borealis import BotBorealis
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. All systems functional.")
print... | from borealis import BotBorealis
import time
while True:
bot = None
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. ... | from borealis import BotBorealis
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. All systems functional.")
print("Starting BORE... | <commit_before>from borealis import BotBorealis
try:
print("Welcome to BOREALIS.")
print("Initializing BOREALIS and its subcomponents.")
bot = BotBorealis("config.yml")
print("Initialization completed. Readying subcomponents.")
bot.setup()
print("Subcomponents ready. All systems functional.")
print... |
fb54f741783ddefd0f452216b96808dea52c055e | sai/__init__.py | sai/__init__.py | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_re... | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_fi... | Remove remaining reference to mongo | Remove remaining reference to mongo
| Python | apache-2.0 | sivel/sai | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_re... | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_fi... | <commit_before>import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
... | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_fi... | import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
@app.before_re... | <commit_before>import os
import logging
from flask import Flask, abort, g
from config import config
from api_v1 import bp as api_v1_bp
from ui import bp as ui_bp
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(api_v1_bp, url_prefix='/api/v1')
app.register_blueprint(ui_bp, url_path='/')
... |
64d109e975eb42bc06bb6b5e1deb26536e6f1def | tests/test_KociembaSolver.py | tests/test_KociembaSolver.py | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | Reduce the number of test for Kociemba Solver | Reduce the number of test for Kociemba Solver
| Python | mit | Wiston999/python-rubik | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | <commit_before>from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.Ko... | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.KociembaSolver(c)... | <commit_before>from src.Move import Move
from src.NaiveCube import NaiveCube
from src.Cubie imort Cube
from src.Solver import Kociemba
import timeout_decorator
import unittest
class TestKociembaSolver(unittest.TestCase):
@timeout_decorator.timeout(300)
def _test_solution(self, c):
solver = Kociemba.Ko... |
50f3233a8560120cc0c55b02849f1b586cf1aa27 | languages_plus/utils.py | languages_plus/utils.py | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = country.languages.strip(',')
if langs:
codes = langs.split("... | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = ''
try:
langs = country.languages.strip(',')
if lang... | Fix a crash if a country has no languages spoken | Fix a crash if a country has no languages spoken
| Python | mit | cordery/django-languages-plus | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = country.languages.strip(',')
if langs:
codes = langs.split("... | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = ''
try:
langs = country.languages.strip(',')
if lang... | <commit_before>from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = country.languages.strip(',')
if langs:
codes ... | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = ''
try:
langs = country.languages.strip(',')
if lang... | from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = country.languages.strip(',')
if langs:
codes = langs.split("... | <commit_before>from django.core.exceptions import ObjectDoesNotExist
from countries_plus.models import Country
from .models import Language, CultureCode
def associate_countries_and_languages():
for country in Country.objects.all():
langs = country.languages.strip(',')
if langs:
codes ... |
780a330e1f185d7c19953edb5bc1767582501197 | tests/test_card.py | tests/test_card.py | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | Change ConcreteCard test class params. | Change ConcreteCard test class params.
| Python | mit | johnpapa2/twenty-one,johnpapa2/twenty-one | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | <commit_before>"""
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
... | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | """
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
self._c... | <commit_before>"""
Created on Dec 04, 2016
@author: john papa
Copyright 2016 John Papa. All rights reserved.
This work is licensed under the MIT License.
"""
import unittest
from cards.card import Card
class Test_Card(unittest.TestCase):
def setUp(self):
self._suit = "clubs"
self._rank = "10"
... |
e264224ee69cb37a02f28a6c78a231dd6d41db58 | examples/web_rewrite_headers_middleware.py | examples/web_rewrite_headers_middleware.py | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
@asyncio.corou... | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response, HTTPException
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
... | Fix example for rewriting response headers in middleware to set headers for exceptions like 404 Not Found | Fix example for rewriting response headers in middleware to set headers for exceptions like 404 Not Found
| Python | apache-2.0 | alex-eri/aiohttp-1,jettify/aiohttp,hellysmile/aiohttp,z2v/aiohttp,juliatem/aiohttp,rutsky/aiohttp,AlexLisovoy/aiohttp,KeepSafe/aiohttp,mind1master/aiohttp,rutsky/aiohttp,Eyepea/aiohttp,jojurajan/aiohttp,mind1master/aiohttp,jashandeep-sohi/aiohttp,mind1master/aiohttp,alexsdutton/aiohttp,elastic-coders/aiohttp,pathcl/aio... | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
@asyncio.corou... | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response, HTTPException
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
... | <commit_before>#!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
... | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response, HTTPException
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
... | #!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
@asyncio.corou... | <commit_before>#!/usr/bin/env python3
"""
Example for rewriting response headers by middleware.
"""
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def handler(request):
return Response(text="Everything is fine")
@asyncio.coroutine
def middleware_factory(app, next_handler):
... |
b75a9eab312a2ac787e4b0e44115f8bad4508418 | route/__init__.py | route/__init__.py | class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def query(self):
""" search domain routing info """
pass
def register(self):
""" register domain nginx reverse proxy """
... | from route.db import db_session
from route.models import Domain
import os
import subprocess
class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def search(self, option, value):
""" search domain rou... | Add register, restart, write to handle nginx | Add register, restart, write to handle nginx
| Python | apache-2.0 | bunseokbot/proxy_register,bunseokbot/proxy_register | class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def query(self):
""" search domain routing info """
pass
def register(self):
""" register domain nginx reverse proxy """
... | from route.db import db_session
from route.models import Domain
import os
import subprocess
class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def search(self, option, value):
""" search domain rou... | <commit_before>class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def query(self):
""" search domain routing info """
pass
def register(self):
""" register domain nginx reverse pr... | from route.db import db_session
from route.models import Domain
import os
import subprocess
class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def search(self, option, value):
""" search domain rou... | class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def query(self):
""" search domain routing info """
pass
def register(self):
""" register domain nginx reverse proxy """
... | <commit_before>class Route(object):
def __init__(self, ip, domain):
self.ip = ip
self.domain = domain
def __str__(self):
return self.domain
def query(self):
""" search domain routing info """
pass
def register(self):
""" register domain nginx reverse pr... |
90cd7a194ce1294d6b14b819b10ca62e3d058cb9 | auslib/test/web/test_dockerflow.py | auslib/test/web/test_dockerflow.py | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | Add test to make sure public facing app raises exception when it hits an error. | Add test to make sure public facing app raises exception when it hits an error.
| Python | mpl-2.0 | aksareen/balrog,nurav/balrog,nurav/balrog,mozbhearsum/balrog,tieu/balrog,mozbhearsum/balrog,aksareen/balrog,testbhearsum/balrog,testbhearsum/balrog,nurav/balrog,aksareen/balrog,tieu/balrog,nurav/balrog,tieu/balrog,mozbhearsum/balrog,tieu/balrog,testbhearsum/balrog,mozbhearsum/balrog,aksareen/balrog,testbhearsum/balrog | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | <commit_before>import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"co... | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"commit":"abcdef12... | <commit_before>import mock
from auslib.test.web.test_client import ClientTestBase
class TestDockerflowEndpoints(ClientTestBase):
def testVersion(self):
ret = self.client.get("/__version__")
self.assertEquals(ret.data, """
{
"source":"https://github.com/mozilla/balrog",
"version":"1.0",
"co... |
9b255d781e3b0aefa708e1366810d14700384d10 | satyr/__init__.py | satyr/__init__.py | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.DEBU... | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.INFO... | Set default logging level to INFO | Set default logging level to INFO
| Python | apache-2.0 | lensacom/satyr | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.DEBU... | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.INFO... | <commit_before>from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(lev... | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.INFO... | from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(level=logging.DEBU... | <commit_before>from __future__ import absolute_import, division, print_function
import logging
import pkg_resources as _pkg_resources
from .scheduler import QueueScheduler
from .executor import OneOffExecutor
from .messages import PythonTask, PythonTaskStatus # important to register classes
logging.basicConfig(lev... |
bcef6c233fd607d160bc9042c7957abcea1e43cd | ycml/transformers/base.py | ycml/transformers/base.py | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | Reshape transformers to 2D matrix | Reshape transformers to 2D matrix
| Python | apache-2.0 | skylander86/ycml | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... |
c7daef487fee51b68d410d2f4be3fd16068c7d5a | tests/export/test_task_types_to_csv.py | tests/export/test_task_types_to_csv.py | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | Fix task type export test | Fix task type export test
| Python | agpl-3.0 | cgwire/zou | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | <commit_before>from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.gen... | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_d... | <commit_before>from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.gen... |
b77d4a534f5f6435f0f60c0a082b9ae02673d574 | tests/twisted/connect/network-error.py | tests/twisted/connect/network-error.py |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... | Make sure state change signal to 'disconnected' is also sent. | Make sure state change signal to 'disconnected' is also sent.
| Python | lgpl-2.1 | Ziemin/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,jku/telepathy-gabble,Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,mlundblad/telepathy-gabble |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... | <commit_before>
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
... |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... |
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
args=[cs.CONN_S... | <commit_before>
"""
Connection is disconnected because server closes its TCP stream abruptly.
"""
from gabbletest import exec_test
from servicetest import EventPattern
import constants as cs
import sys
def test(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
... |
d1614d3747f72c1f32e74afb6e4b98eb476c7266 | utils/layers_test.py | utils/layers_test.py | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | Add Second Shape Test for Layers Util | Add Second Shape Test for Layers Util
| Python | apache-2.0 | googleinterns/audio_synthesis | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | <commit_before># Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
... | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | # Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
inputs =... | <commit_before># Lint as: python3
"""Tests for spectral."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import os
import layers
class LayersTest(tf.test.TestCase):
def test_conv_transpose_shape(self):
... |
2450955e2beb14e4c6ba0394e4bcd64e2ce2e4ec | wordcloud/views.py | wordcloud/views.py | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | Add diagnostic output for when X-SendFile is misconfigured | Add diagnostic output for when X-SendFile is misconfigured
| Python | agpl-3.0 | mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,geoffkilpin/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | <commit_before>import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries ... | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries = int(max_entri... | <commit_before>import json
import os
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from .wordcloud import popular_words
@cache_page(60*60*4)
def wordcloud(request, max_entries=30):
""" Return tag cloud JSON results"""
max_entries ... |
4955e830d3130a6ae86d4a1c37db23777ee792d7 | go_http/__init__.py | go_http/__init__.py | """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
]
| """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
from .account import AccountApiClient
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
'AccountApiClient',
]
| Add AccountApiClient to top-level package. | Add AccountApiClient to top-level package.
| Python | bsd-3-clause | praekelt/go-http-api,praekelt/go-http-api | """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
]
Add AccountApiClient to top-level package. | """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
from .account import AccountApiClient
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
'AccountApiClient',
]
| <commit_before>"""Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
]
<commit_msg>Add AccountApiClient to top-level package.<commit_after> | """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
from .account import AccountApiClient
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
'AccountApiClient',
]
| """Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
]
Add AccountApiClient to top-level package."""Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
from .account import Accou... | <commit_before>"""Vumi Go HTTP API client library."""
from .send import HttpApiSender, LoggingSender
__version__ = "0.3.1a0"
__all__ = [
'HttpApiSender', 'LoggingSender',
]
<commit_msg>Add AccountApiClient to top-level package.<commit_after>"""Vumi Go HTTP API client library."""
from .send import HttpApiSender,... |
e37e964bf9d2819c0234303d31ed2839c317be04 | openquake/engine/tests/export/core_test.py | openquake/engine/tests/export/core_test.py |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | Fix a broken export test | Fix a broken export test
| Python | agpl-3.0 | gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | <commit_before>
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ope... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | <commit_before>
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ope... |
546a4681aa54ba183e956d220e98ef67ae6de691 | user/decorators.py | user/decorators.py | from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
def custom_login_required(view):
# view argument must be a function
def new_view(request, *args, **kwargs):
user = get_user(request)
if user.is_authenticated():
return v... | from functools import wraps
from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
from django.utils.decorators import \
available_attrs
def custom_login_required(view):
# view argument must be a function
@wraps(view, assigned=available_attrs(view... | Use functools.wraps to copy view signature. | Ch20: Use functools.wraps to copy view signature.
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
def custom_login_required(view):
# view argument must be a function
def new_view(request, *args, **kwargs):
user = get_user(request)
if user.is_authenticated():
return v... | from functools import wraps
from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
from django.utils.decorators import \
available_attrs
def custom_login_required(view):
# view argument must be a function
@wraps(view, assigned=available_attrs(view... | <commit_before>from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
def custom_login_required(view):
# view argument must be a function
def new_view(request, *args, **kwargs):
user = get_user(request)
if user.is_authenticated():
... | from functools import wraps
from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
from django.utils.decorators import \
available_attrs
def custom_login_required(view):
# view argument must be a function
@wraps(view, assigned=available_attrs(view... | from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
def custom_login_required(view):
# view argument must be a function
def new_view(request, *args, **kwargs):
user = get_user(request)
if user.is_authenticated():
return v... | <commit_before>from django.conf import settings
from django.contrib.auth import get_user
from django.shortcuts import redirect
def custom_login_required(view):
# view argument must be a function
def new_view(request, *args, **kwargs):
user = get_user(request)
if user.is_authenticated():
... |
7fc3867e7b8a01854116b43d9961e1063c051006 | mmmpaste/helpers.py | mmmpaste/helpers.py | from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")
| from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")[0]
| Select the first IP address from the X-Forwarded-For list. | Select the first IP address from the X-Forwarded-For list.
| Python | bsd-2-clause | ryanc/mmmpaste,ryanc/mmmpaste | from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")
Select the first IP address from the X-Forwarded-For list. | from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")[0]
| <commit_before>from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")
<commit_msg>Select the first IP address from the X-Forwarded-For list.<commit_after> | from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")[0]
| from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")
Select the first IP address from the X-Forwarded-For list.from flask import request
def get_ip():
if not request.headers.get("X-Forwarded... | <commit_before>from flask import request
def get_ip():
if not request.headers.get("X-Forwarded-For"):
return request.remote_addr
return request.headers.get("X-Forwarded-For")
<commit_msg>Select the first IP address from the X-Forwarded-For list.<commit_after>from flask import request
def get_ip():
... |
a778a41c8deb6fd9812e405143e34679122c18db | website/addons/base/utils.py | website/addons/base/utils.py | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_s... | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
user_addon = user.get_addon(config.short_name)
ret = {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_tem... | Add user_settings to serialized addon settings | Add user_settings to serialized addon settings
| Python | apache-2.0 | ZobairAlijan/osf.io,leb2dg/osf.io,doublebits/osf.io,mluo613/osf.io,jolene-esposito/osf.io,alexschiller/osf.io,mattclark/osf.io,laurenrevere/osf.io,jolene-esposito/osf.io,SSJohns/osf.io,billyhunt/osf.io,pattisdr/osf.io,samanehsan/osf.io,DanielSBrown/osf.io,cslzchen/osf.io,caseyrygt/osf.io,zachjanicki/osf.io,Nesiehr/osf.... | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_s... | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
user_addon = user.get_addon(config.short_name)
ret = {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_tem... | <commit_before>from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basenam... | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
user_addon = user.get_addon(config.short_name)
ret = {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_tem... | from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_s... | <commit_before>from os.path import basename
from website import settings
def serialize_addon_config(config, user):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basenam... |
13774b20f18d23dfb69c65dd151e3aed9734a88f | website/core/settings/loc.py | website/core/settings/loc.py | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets
sys.path.append(
abspath(join(PROJECT_ROOT, '../secrets/buzz/stg'))
)
from secrets import *
# Set static URL
STATIC_URL = '/static' | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets -- not needed
#sys.path.append(
# abspath(join(PROJECT_ROOT, '../secrets/TimelineJS/stg'))
#)
#from secrets import *
# Set static URL
STATIC_URL = '/static' | Comment out secrets import (not needed for this project) | Comment out secrets import (not needed for this project)
| Python | mpl-2.0 | stea4lth/TimelineJS,noikiy/TimelineJS,azeemmufti/TimelineJS,ryekee/TimelineJS,djaney/TimelineJS,1modm/TimelineJS,zstao/TimelineJS,wangjun/TimelineJS,1modm/TimelineJS,stea4lth/TimelineJS,matt-edgedesign/Timelinejs,LauraHilliger/TimelineJS,djaney/TimelineJS,ycaihua/TimelineJS,deenjohn/TimelineJS,ryekee/TimelineJS,deenjoh... | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets
sys.path.append(
abspath(join(PROJECT_ROOT, '../secrets/buzz/stg'))
)
from secrets import *
# Set static URL
STATIC_URL = '/static'Comment out secrets import (not needed for this project) | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets -- not needed
#sys.path.append(
# abspath(join(PROJECT_ROOT, '../secrets/TimelineJS/stg'))
#)
#from secrets import *
# Set static URL
STATIC_URL = '/static' | <commit_before>"""Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets
sys.path.append(
abspath(join(PROJECT_ROOT, '../secrets/buzz/stg'))
)
from secrets import *
# Set static URL
STATIC_URL = '/static'<commit_msg>Comment out secrets import (not needed... | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets -- not needed
#sys.path.append(
# abspath(join(PROJECT_ROOT, '../secrets/TimelineJS/stg'))
#)
#from secrets import *
# Set static URL
STATIC_URL = '/static' | """Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets
sys.path.append(
abspath(join(PROJECT_ROOT, '../secrets/buzz/stg'))
)
from secrets import *
# Set static URL
STATIC_URL = '/static'Comment out secrets import (not needed for this project)"""Local ... | <commit_before>"""Local settings and globals."""
import sys
from os.path import normpath, join
from .base import *
# Import secrets
sys.path.append(
abspath(join(PROJECT_ROOT, '../secrets/buzz/stg'))
)
from secrets import *
# Set static URL
STATIC_URL = '/static'<commit_msg>Comment out secrets import (not needed... |
1cb7581f63d0d9d4e6eca69316930912c41a4fb5 | Instanssi/admin_upload/models.py | Instanssi/admin_upload/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, mihin/missä tie... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
import os.path
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, ... | Add helper function for getting name from UploadedFile, add model to admin. | admin_upload: Add helper function for getting name from UploadedFile, add model to admin.
| Python | mit | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, mihin/missä tie... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
import os.path
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, ... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, ... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
import os.path
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, ... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, mihin/missä tie... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
class UploadedFile(models.Model):
user = models.ForeignKey(User, verbose_name=u'Käyttäjä')
description = models.TextField(u'Kuvaus', help_text=u'Lyhyt kuvaus siitä, ... |
140ff37058eefe4ab79932d96cff4a90aa7b113e | contrib/tests/test_bind_provider.py | contrib/tests/test_bind_provider.py | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
spcom.return_value = '10.0.0.1'
... | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
ugm.return_value = '10.0.0.1'
... | Correct bind provider mock in tests | Correct bind provider mock in tests
| Python | mit | chuckbutler/DNS-Charm,chuckbutler/DNS-Charm | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
spcom.return_value = '10.0.0.1'
... | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
ugm.return_value = '10.0.0.1'
... | <commit_before>import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
spcom.return_value... | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
ugm.return_value = '10.0.0.1'
... | import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
spcom.return_value = '10.0.0.1'
... | <commit_before>import unittest
from mock import patch, Mock, MagicMock
import os
import sys
from bind.provider import Provider
class TestBindProvider(unittest.TestCase):
@patch('subprocess.check_output')
@patch('bind.provider.unit_get')
def test_first_setup(self, ugm, spcom):
spcom.return_value... |
d213aa242b6293a67ba13859a81af4354d81f522 | h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7798_overlapped_knots.py | h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7798_overlapped_knots.py | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | Add assert to num knots validation unit test | Add assert to num knots validation unit test
| Python | apache-2.0 | h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3 | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | <commit_before>import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1... | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
... | <commit_before>import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from tests import pyunit_utils
def knots_error():
# load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1... |
380baa34af7e8a704780f0ec535b626f4a286e23 | deflect/admin.py | deflect/admin.py | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | Fix model creator updating on change event | Fix model creator updating on change event
| Python | bsd-3-clause | jbittel/django-deflect | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | <commit_before>from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
re... | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
readonly_fields =... | <commit_before>from django.contrib import admin
from .models import RedirectURL
class RedirectURLAdmin(admin.ModelAdmin):
list_display = ('url', 'short_url', 'hits', 'last_used', 'creator', 'campaign', 'medium',)
list_filter = ('creator__username', 'campaign', 'medium',)
ordering = ('-last_used',)
re... |
cc48ad87026b57b02530322b3c27f2d60e94f2e4 | packages/mono_crypto.py | packages/mono_crypto.py | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | Add a git reset to trigger a possible 'error: unable to read sha1 file...' error and cause a fresh checkout to resolve | Add a git reset to trigger a possible 'error: unable to read sha1 file...' error and cause a fresh checkout to resolve
| Python | mit | mono/bockbuild,mono/bockbuild | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | <commit_before>from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
d... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | <commit_before>from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
d... |
1cda84c7f23c6a5e89c9f871dba5d12c00789d1a | extract_contamination.py | extract_contamination.py | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | Handle empty fastq_screen files properly. | Handle empty fastq_screen files properly.
| Python | apache-2.0 | pombo-lab/gamtools,pombo-lab/gamtools | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | <commit_before>import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields ... | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields = line.strip().... | <commit_before>import sys
import os
header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']
print '\t'.join(header)
for fi in sys.argv[1:]:
sample = os.path.basename(fi).split('.')[0]
with open(fi) as screen_results:
results = {}
for line in screen_results:
fields ... |
d9ab07c9c984d50ff93040d0220e4a3997e29f79 | fluent_comments/email.py | fluent_comments/email.py | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import get_current_site
def send_comment_posted(comm... | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils.encoding import force_text
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import ge... | Use force_text() to get page title | Use force_text() to get page title
Some models might handle __unicode__/__str__ badly
| Python | apache-2.0 | edoburu/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments,django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import get_current_site
def send_comment_posted(comm... | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils.encoding import force_text
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import ge... | <commit_before>from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import get_current_site
def send_comm... | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils.encoding import force_text
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import ge... | from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import get_current_site
def send_comment_posted(comm... | <commit_before>from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
try:
from django.contrib.sites.shortcuts import get_current_site # Django 1.9+
except ImportError:
from django.contrib.sites.models import get_current_site
def send_comm... |
815c246f1ef185e24991efc4075b2358c7955c6c | onadata/libs/utils/storage.py | onadata/libs/utils/storage.py | # coding: utf-8
import os
import shutil
from django.core.files.storage import get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
storage.delete(os.path.j... | # coding: utf-8
import os
import shutil
from django.core.files.storage import FileSystemStorage, get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
stora... | Use `isinstance()` at the cost of an extra import | Use `isinstance()` at the cost of an extra import
| Python | bsd-2-clause | kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat | # coding: utf-8
import os
import shutil
from django.core.files.storage import get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
storage.delete(os.path.j... | # coding: utf-8
import os
import shutil
from django.core.files.storage import FileSystemStorage, get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
stora... | <commit_before># coding: utf-8
import os
import shutil
from django.core.files.storage import get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
storage.d... | # coding: utf-8
import os
import shutil
from django.core.files.storage import FileSystemStorage, get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
stora... | # coding: utf-8
import os
import shutil
from django.core.files.storage import get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
storage.delete(os.path.j... | <commit_before># coding: utf-8
import os
import shutil
from django.core.files.storage import get_storage_class
def delete_user_storage(username):
storage = get_storage_class()()
def _recursive_delete(path):
directories, files = storage.listdir(path)
for file_ in files:
storage.d... |
736388eaf2b408ec28c2948aa412411067f8346d | tests/helper.py | tests/helper.py | import logging
import shutil
import os
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Workspace(object):
def __init__(self, name='default', ... | import logging
import shutil
import os
if os.environ.get('OPSUTILS_TEST_LOGGING'):
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Wor... | Make test logging a configurable setting | Make test logging a configurable setting
| Python | mit | silas/ops | import logging
import shutil
import os
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Workspace(object):
def __init__(self, name='default', ... | import logging
import shutil
import os
if os.environ.get('OPSUTILS_TEST_LOGGING'):
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Wor... | <commit_before>import logging
import shutil
import os
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Workspace(object):
def __init__(self, n... | import logging
import shutil
import os
if os.environ.get('OPSUTILS_TEST_LOGGING'):
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Wor... | import logging
import shutil
import os
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Workspace(object):
def __init__(self, name='default', ... | <commit_before>import logging
import shutil
import os
opsutils_logger = logging.getLogger('opsutils')
opsutils_logger.setLevel(logging.DEBUG)
opsutils_logger.addHandler(logging.StreamHandler())
PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '.tmp')
class Workspace(object):
def __init__(self, n... |
b242de3217ad9cf6a98ca2513ed1e4f66d2537ad | tests/NongeneratingSymbolsRemove/SimpleTest.py | tests/NongeneratingSymbolsRemove/SimpleTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class SimpleTest(TestCase):
pass
if __name__ == '__main__':
main()
| #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
p... | Add simple test of removing nongenerating symbols | Add simple test of removing nongenerating symbols
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class SimpleTest(TestCase):
pass
if __name__ == '__main__':
main()
Add simple test ... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
p... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class SimpleTest(TestCase):
pass
if __name__ == '__main__':
main()
<... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
p... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class SimpleTest(TestCase):
pass
if __name__ == '__main__':
main()
Add simple test ... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import ContextFree
class SimpleTest(TestCase):
pass
if __name__ == '__main__':
main()
<... |
dd8c4843b7872023e276247a4d8de052b42fa9a6 | token_stream.py | token_stream.py | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return char in ' \t'
def is_digit(self, char):
return char.isdigit()
def is_operator... | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
operators = {
'+': {'prec': 10, 'assoc': 'left'},
'*': {'prec': 20, 'assoc': 'left'}
}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return... | Define precedence and associativity for operators | Define precedence and associativity for operators
| Python | mit | babu-thomas/calculator-parser | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return char in ' \t'
def is_digit(self, char):
return char.isdigit()
def is_operator... | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
operators = {
'+': {'prec': 10, 'assoc': 'left'},
'*': {'prec': 20, 'assoc': 'left'}
}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return... | <commit_before># '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return char in ' \t'
def is_digit(self, char):
return char.isdigit()
... | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
operators = {
'+': {'prec': 10, 'assoc': 'left'},
'*': {'prec': 20, 'assoc': 'left'}
}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return... | # '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return char in ' \t'
def is_digit(self, char):
return char.isdigit()
def is_operator... | <commit_before># '2+3' -> {type:num, value: 2}, {type:op, value:'+'}, {type:num, value: 3}
class TokenStream:
def __init__(self, input_stream):
self.input_stream = input_stream
def is_whitespace(self, char):
return char in ' \t'
def is_digit(self, char):
return char.isdigit()
... |
b834f553501d4c9ba47bcad6497555aacc06249c | gavel/controllers/api.py | gavel/controllers/api.py | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | Add API endpoint for getting decisions | Add API endpoint for getting decisions
| Python | agpl-3.0 | atagh/gavel-clone,anishathalye/gavel,atagh/gavel-clone,anishathalye/gavel,anishathalye/gavel | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | <commit_before>from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']... | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']]
data += [... | <commit_before>from gavel import app
from gavel.models import *
import gavel.utils as utils
from flask import Response
@app.route('/api/items.csv')
@utils.requires_auth
def item_dump():
items = Item.query.order_by(desc(Item.mu)).all()
data = [['Mu', 'Sigma Squared', 'Name', 'Location', 'Description', 'Active']... |
31d0af7d5f3a984d4f6c7be62d599553a3bc7c08 | opps/articles/utils.py | opps/articles/utils.py | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | Add channel root on set context data, sent to template | Add channel root on set context data, sent to template
| Python | mit | YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,opps/opps | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | <commit_before># -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_sl... | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | # -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_slug__in=self.cha... | <commit_before># -*- coding: utf-8 -*-
from django.utils import timezone
from opps.articles.models import ArticleBox, Article
def set_context_data(self, SUPER, **kwargs):
context = super(SUPER, self).get_context_data(**kwargs)
article = Article.objects.filter(
site=self.site,
channel_long_sl... |
eb8884ce0c7dec3433d76c49942f0531cc96d915 | plugin/main.py | plugin/main.py | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
url... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
os.... | Set environmental vars for rancher-compose to work | Set environmental vars for rancher-compose to work
| Python | apache-2.0 | dangerfarms/drone-rancher | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
url... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
os.... | <commit_before>#!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise a... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
os.... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise an error
url... | <commit_before>#!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Required fields should raise a... |
a7028ca3d3dea5a9f8891dfd2947b671bbe02b7e | pentai/gui/my_button.py | pentai/gui/my_button.py |
from kivy.uix.button import Button
import audio as a_m
class MyButton(Button):
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_point(*touch.pos):
if not hasattr(self, "silent"):
a_m.instance.click()
super(MyButton, self).on_touch_up(touch, *args, **kwargs... |
from kivy.uix.button import Button
import audio as a_m
from pentai.base.defines import *
class MyButton(Button):
def __init__(self, *args, **kwargs):
super(MyButton, self).__init__(*args, **kwargs)
self.silent = False
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_poin... | Make "silent" an attribute from __init__ | Make "silent" an attribute from __init__
| Python | mit | cropleyb/pentai,cropleyb/pentai,cropleyb/pentai |
from kivy.uix.button import Button
import audio as a_m
class MyButton(Button):
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_point(*touch.pos):
if not hasattr(self, "silent"):
a_m.instance.click()
super(MyButton, self).on_touch_up(touch, *args, **kwargs... |
from kivy.uix.button import Button
import audio as a_m
from pentai.base.defines import *
class MyButton(Button):
def __init__(self, *args, **kwargs):
super(MyButton, self).__init__(*args, **kwargs)
self.silent = False
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_poin... | <commit_before>
from kivy.uix.button import Button
import audio as a_m
class MyButton(Button):
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_point(*touch.pos):
if not hasattr(self, "silent"):
a_m.instance.click()
super(MyButton, self).on_touch_up(touch, ... |
from kivy.uix.button import Button
import audio as a_m
from pentai.base.defines import *
class MyButton(Button):
def __init__(self, *args, **kwargs):
super(MyButton, self).__init__(*args, **kwargs)
self.silent = False
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_poin... |
from kivy.uix.button import Button
import audio as a_m
class MyButton(Button):
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_point(*touch.pos):
if not hasattr(self, "silent"):
a_m.instance.click()
super(MyButton, self).on_touch_up(touch, *args, **kwargs... | <commit_before>
from kivy.uix.button import Button
import audio as a_m
class MyButton(Button):
def on_touch_up(self, touch, *args, **kwargs):
if self.collide_point(*touch.pos):
if not hasattr(self, "silent"):
a_m.instance.click()
super(MyButton, self).on_touch_up(touch, ... |
ad07405ca877d65f30c9acd19abb4e782d854eaa | workshops/views.py | workshops/views.py | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | Order workshops by start date before title | Order workshops by start date before title
| Python | bsd-3-clause | WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | <commit_before>from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(se... | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(self):
ev... | <commit_before>from django.views.generic import ListView, DetailView
from config.utils import get_active_event
from workshops.models import Workshop
class WorkshopListView(ListView):
template_name = 'workshops/list_workshops.html'
model = Workshop
context_object_name = 'workshops'
def get_queryset(se... |
a39a7eb7d43282337d3e3df10921a1b0d9f0e3e4 | odeintw/__init__.py | odeintw/__init__.py | # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from numpy.testing import Tester as _Tester
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
test = _Tester().test
| # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
| Remove some unused test infrastructure | MAINT: Remove some unused test infrastructure
| Python | bsd-3-clause | WarrenWeckesser/odeintw | # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from numpy.testing import Tester as _Tester
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
test = _Tester().test
MAINT: Remove some unused test infrastructure | # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
| <commit_before># Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from numpy.testing import Tester as _Tester
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
test = _Tester().test
<commit_msg>MAINT: Remove some unused test infrastructure<commit_af... | # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
| # Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from numpy.testing import Tester as _Tester
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
test = _Tester().test
MAINT: Remove some unused test infrastructure# Copyright (c) 2014, Warren Weckesse... | <commit_before># Copyright (c) 2014, Warren Weckesser
# All rights reserved.
# See the LICENSE file for license information.
from numpy.testing import Tester as _Tester
from ._odeintw import odeintw
__version__ = "0.1.2.dev3"
test = _Tester().test
<commit_msg>MAINT: Remove some unused test infrastructure<commit_af... |
73df211afe212124a69f8585e30d03332b20767c | migrate/__init__.py | migrate/__init__.py | """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.7.3.dev'
| """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.8.1'
| Fix the version number to match the last release. | Fix the version number to match the last release.
** NOTE: our release process really should do this
ahead of time.
Change-Id: Ic0cce0d57b4f05092417c4cf1a4ca5a74812ec3c
| Python | mit | rcherrueau/sqlalchemy-migrate,rcherrueau/sqlalchemy-migrate,andras-tim/sqlalchemy-migrate,dannon/sqlalchemy-migrate,stackforge/sqlalchemy-migrate,openstack/sqlalchemy-migrate,openstack/sqlalchemy-migrate | """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.7.3.dev'
F... | """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.8.1'
| <commit_before>"""
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ ... | """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.8.1'
| """
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ = '0.7.3.dev'
F... | <commit_before>"""
SQLAlchemy migrate provides two APIs :mod:`migrate.versioning` for
database schema version and repository management and
:mod:`migrate.changeset` that allows to define database schema changes
using Python.
"""
from migrate.versioning import *
from migrate.changeset import *
__version__ ... |
a116b22a76b0f833aa9f7f2e2ce4b36a95bc9ba0 | freight/tasks/send_pending_notifications.py | freight/tasks/send_pending_notifications.py | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | Add logging when no notifications due | Add logging when no notifications due
| Python | apache-2.0 | getsentry/freight,klynton/freight,rshk/freight,rshk/freight,rshk/freight,klynton/freight,rshk/freight,getsentry/freight,klynton/freight,klynton/freight,getsentry/freight,getsentry/freight,getsentry/freight | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | <commit_before>from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=Non... | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=None)
def send_pen... | <commit_before>from __future__ import absolute_import
import logging
from freight import notifiers
from freight.config import celery, redis
from freight.models import Task
from freight.notifiers import queue
from freight.utils.redis import lock
@celery.task(name='freight.send_pending_notifications', max_retries=Non... |
83a517ad963e08e0200e4eeb3a817acc069ba7a4 | jacquard/cli.py | jacquard/cli.py | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | Print help when invoked with no arguments | Print help when invoked with no arguments
This is more useful.
| Python | mit | prophile/jacquard,prophile/jacquard | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | <commit_before>import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
... | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='stor... | <commit_before>import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
... |
882fc867ab115f2b84f2f185bcebf3eb4a1d2fc8 | core/forms.py | core/forms.py | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | Fix profile creation. (Need tests badly). | Fix profile creation. (Need tests badly). | Python | mit | kenwang76/readthedocs.org,soulshake/readthedocs.org,nyergler/pythonslides,gjtorikian/readthedocs.org,tddv/readthedocs.org,kenshinthebattosai/readthedocs.org,ojii/readthedocs.org,LukasBoersma/readthedocs.org,mhils/readthedocs.org,sid-kap/readthedocs.org,michaelmcandrew/readthedocs.org,michaelmcandrew/readthedocs.org,oji... | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | <commit_before>from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = U... | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = UserProfile
... | <commit_before>from django.forms import ModelForm
from django.forms.fields import CharField
from models import UserProfile
class UserProfileForm(ModelForm):
first_name = CharField(label='First name', required=False)
last_name = CharField(label='Last name', required=False)
class Meta:
model = U... |
0874b3e5d5316c53d1d941e4e337bec45469bf6d | core/hybra.py | core/hybra.py | import data_loader
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():
retur... | import data_loader
import re
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():... | Add method for filtering from text | Add method for filtering from text
| Python | mit | HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core | import data_loader
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():
retur... | import data_loader
import re
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():... | <commit_before>import data_loader
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sourc... | import data_loader
import re
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():... | import data_loader
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sources():
retur... | <commit_before>import data_loader
import descriptives
import network as module_network
import timeline as module_timeline
import wordclouds as module_wordclouds
__sources = dir( data_loader )
__sources = filter( lambda x: x.startswith('load_') , __sources )
__sources = map( lambda x: x[5:], __sources )
def data_sourc... |
28ee229284459402d73f41e756dc95fe99f0227b | pybot/resources/urls.py | pybot/resources/urls.py | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/me/messages" | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/" | Update URL for generic graph api url | Update URL for generic graph api url
| Python | mit | ben-cunningham/python-messenger-bot,ben-cunningham/pybot | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/me/messages"Update URL for generic graph api url | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/" | <commit_before>FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/me/messages"<commit_msg>Update URL for generic graph api url<commit_after> | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/" | FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/me/messages"Update URL for generic graph api urlFACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/" | <commit_before>FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/me/messages"<commit_msg>Update URL for generic graph api url<commit_after>FACEBOOK_MESSAGES_POST_URL = "https://graph.facebook.com/v2.6/" |
ed45016c7319d2df1f894ec17971d0d1c4d8abe1 | museum_site/base.py | museum_site/base.py | from django.db import models
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/change/".format(name, self.id)
def url(self)... | from django.db import models
from django.utils.safestring import mark_safe
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/cha... | Add specific error messages for mandatory subclass methods | Add specific error messages for mandatory subclass methods
| Python | mit | DrDos0016/z2,DrDos0016/z2,DrDos0016/z2 | from django.db import models
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/change/".format(name, self.id)
def url(self)... | from django.db import models
from django.utils.safestring import mark_safe
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/cha... | <commit_before>from django.db import models
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/change/".format(name, self.id)
... | from django.db import models
from django.utils.safestring import mark_safe
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/cha... | from django.db import models
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/change/".format(name, self.id)
def url(self)... | <commit_before>from django.db import models
class BaseModel(models.Model):
model_name = None
#title
#description
#preview
#table_fields = []
def admin_url(self):
name = self.model_name.replace("-", "_").lower()
return "/admin/museum_site/{}/{}/change/".format(name, self.id)
... |
6c19a46f4ef146a67c43ca46c3e71dd2a05358fc | api/caching/tasks.py | api/caching/tasks.py | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | Remove commented out logged decorator | Remove commented out logged decorator
| Python | apache-2.0 | adlius/osf.io,billyhunt/osf.io,baylee-d/osf.io,GageGaskins/osf.io,caneruguz/osf.io,doublebits/osf.io,mluke93/osf.io,felliott/osf.io,asanfilippo7/osf.io,icereval/osf.io,billyhunt/osf.io,emetsger/osf.io,saradbowman/osf.io,doublebits/osf.io,mluke93/osf.io,zamattiac/osf.io,chennan47/osf.io,doublebits/osf.io,acshi/osf.io,cs... | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | <commit_before>import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers... | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers():
# TODO... | <commit_before>import urlparse
import celery
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from framework.tasks import app as celery_app
logger = get_task_logger(__name__)
class VarnishTask(celery.Task):
abstract = True
max_retries = 5
def get_varnish_servers... |
0ad53b5dc887ab4b81e3cf83bfb897340880c3a2 | launch_control/models/test_case.py | launch_control/models/test_case.py | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'd... | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'n... | Fix TestCase definition to have a slot 'name' instead of 'desc' | Fix TestCase definition to have a slot 'name' instead of 'desc'
| Python | agpl-3.0 | Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'd... | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'n... | <commit_before>"""
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('te... | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'n... | """
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('test_case_id', 'd... | <commit_before>"""
Module with the TestCase model.
"""
from launch_control.utils.json.pod import PlainOldData
class TestCase(PlainOldData):
"""
TestCase model.
Currently contains just two fields:
- test_case_id (test-case specific ID)
- name (human readable)
"""
__slots__ = ('te... |
149c56ba2285d42d319b525c04fea6e4a8ea0ec5 | ldaptor/protocols/ldap/__init__.py | ldaptor/protocols/ldap/__init__.py | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | Remove ldaptor.protocols.ldap.__all__, it's unnecessary and had wrong content. | Remove ldaptor.protocols.ldap.__all__, it's unnecessary and had wrong content.
git-svn-id: 554337001ebd49d78cdf0a90d762fa547a80d337@203 373aa48d-36e5-0310-bb30-ae74d9883905
| Python | lgpl-2.1 | antong/ldaptor,antong/ldaptor | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | <commit_before># Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is d... | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | # Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | <commit_before># Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is d... |
996e862befb339165a801673754343fc643ffa86 | 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... | Fix typo from previous commit | Fix typo from previous commit
| 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... |
5dcdfa510e62d754bce6270286e42a76b37c23c4 | inpassing/worker/util.py | inpassing/worker/util.py | # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s):
return datetime.strptime(s, DATE_FMT).replace(tzinfo=timezone.utc)
| # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s, tz=None):
ret = datetime.strptime(s, DATE_FMT)
if tz:
return tz.localize(ret)
else:
... | Support use of local timezones when parsing date strings | Support use of local timezones when parsing date strings
| Python | mit | lukesanantonio/inpassing-backend,lukesanantonio/inpassing-backend | # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s):
return datetime.strptime(s, DATE_FMT).replace(tzinfo=timezone.utc)
Support use of local timezones when... | # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s, tz=None):
ret = datetime.strptime(s, DATE_FMT)
if tz:
return tz.localize(ret)
else:
... | <commit_before># Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s):
return datetime.strptime(s, DATE_FMT).replace(tzinfo=timezone.utc)
<commit_msg>Support ... | # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s, tz=None):
ret = datetime.strptime(s, DATE_FMT)
if tz:
return tz.localize(ret)
else:
... | # Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s):
return datetime.strptime(s, DATE_FMT).replace(tzinfo=timezone.utc)
Support use of local timezones when... | <commit_before># Copyright (c) 2017 Luke San Antonio Bialecki
# All rights reserved.
from datetime import datetime, timezone
DATE_FMT = '%Y-%m-%d'
def date_to_str(day):
return day.strftime(DATE_FMT)
def str_to_date(s):
return datetime.strptime(s, DATE_FMT).replace(tzinfo=timezone.utc)
<commit_msg>Support ... |
cd9048f64c6a2184e148daf0baa7bb3be51b3268 | vol/__init__.py | vol/__init__.py | # coding: utf-8
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform has not been implemented yet'.format(platform)
)
| # coding: utf-8
'''
A cross platform implementation of volume control
'''
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform... | Update doc for vol pkg | Update doc for vol pkg
| Python | bsd-3-clause | Microcore/AGT,Microcore/YAS | # coding: utf-8
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform has not been implemented yet'.format(platform)
)
Upda... | # coding: utf-8
'''
A cross platform implementation of volume control
'''
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform... | <commit_before># coding: utf-8
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform has not been implemented yet'.format(platf... | # coding: utf-8
'''
A cross platform implementation of volume control
'''
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform... | # coding: utf-8
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform has not been implemented yet'.format(platform)
)
Upda... | <commit_before># coding: utf-8
from __future__ import unicode_literals, print_function
from sys import platform
if platform == 'darwin':
from .osx import OSXVolumeController as VolumeController
else:
raise NotImplementedError(
'VolumeController for {} platform has not been implemented yet'.format(platf... |
6aea2f1c3a478be0c6926f442924e1f263955430 | pip_run/__init__.py | pip_run/__init__.py | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.search(params))
with deps.load(*deps.not_... | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
"""
Main entry point for pip-run.
"""
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.s... | Add docstring to run function. | Add docstring to run function.
| Python | mit | jaraco/rwt | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.search(params))
with deps.load(*deps.not_... | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
"""
Main entry point for pip-run.
"""
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.s... | <commit_before>import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.search(params))
with deps.... | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
"""
Main entry point for pip-run.
"""
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.s... | import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.search(params))
with deps.load(*deps.not_... | <commit_before>import sys
from . import deps
from . import commands
from . import launch
from . import scripts
def run(args=None):
if args is None:
args = sys.argv[1:]
pip_args, params = commands.parse_script_args(args)
commands.intercept(pip_args)
pip_args.extend(scripts.DepsReader.search(params))
with deps.... |
1e0ac4612937583dec22a81db833c7962e91edc8 | registries/views.py | registries/views.py | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | Add prefetch to reduce queries on province_state | Add prefetch to reduce queries on province_state
| Python | apache-2.0 | rstens/gwells,bcgov/gwells,bcgov/gwells,rstens/gwells,rstens/gwells,bcgov/gwells,rstens/gwells,bcgov/gwells | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | <commit_before>from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryse... | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryset = Organizatio... | <commit_before>from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from rest_framework.generics import ListAPIView
from registries.models import Organization
from registries.serializers import DrillerListSerializer
class APIDrillerListView(ListAPIView):
queryse... |
d74908f5acb5c1a88965ed086d41435e0041d85b | pyluos/modules/l0_dc_motor.py | pyluos/modules/l0_dc_motor.py | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | Fix l0 dc field name. | Fix l0 dc field name.
| Python | mit | pollen/pyrobus | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | <commit_before>from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(sel... | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(self):
sel... | <commit_before>from __future__ import division
from .module import Module
class DCMotor(object):
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
self._speed = None
@property
def name(self):
return self._name
@property
def speed(sel... |
7f863c30f7e49da29530d141a76c1976e0a679ee | massa/domain.py | massa/domain.py | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | Add a function do make db tables. | Add a function do make db tables. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | <commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1)... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | <commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1)... |
e58688d87ba1c4af718ea3e427d94f68c3df3b16 | qipipe/interfaces/__init__.py | qipipe/interfaces/__init__.py | from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .glue import Glue
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
| from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .unpack import Unpack
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
from .fas... | Replace Glue interface by more restrictive Unpack. | Replace Glue interface by more restrictive Unpack.
| Python | bsd-2-clause | ohsu-qin/qipipe | from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .glue import Glue
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
Replace Glue ... | from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .unpack import Unpack
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
from .fas... | <commit_before>from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .glue import Glue
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownloa... | from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .unpack import Unpack
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
from .fas... | from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .glue import Glue
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownload
Replace Glue ... | <commit_before>from .compress import Compress
from .copy import Copy
from .fix_dicom import FixDicom
from .group_dicom import GroupDicom
from .map_ctp import MapCTP
from .move import Move
from .glue import Glue
from .uncompress import Uncompress
from .xnat_upload import XNATUpload
from .xnat_download import XNATDownloa... |
b2e537c2d054854d0b36ccee7567c9ba9c2a5516 | modulation_test.py | modulation_test.py | import pygame
import random
from demodulate.cfg import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern... | import pygame
import random
import time
from demodulate.cfg import *
from modulate import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = chars_to_elements.letters_to_sequence("NA NA NA NA... | Make modulation test wait for sound to stop playing before exiting | Make modulation test wait for sound to stop playing before exiting
| Python | mit | nickodell/morse-code | import pygame
import random
from demodulate.cfg import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern... | import pygame
import random
import time
from demodulate.cfg import *
from modulate import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = chars_to_elements.letters_to_sequence("NA NA NA NA... | <commit_before>import pygame
import random
from demodulate.cfg import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = g... | import pygame
import random
import time
from demodulate.cfg import *
from modulate import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = chars_to_elements.letters_to_sequence("NA NA NA NA... | import pygame
import random
from demodulate.cfg import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern... | <commit_before>import pygame
import random
from demodulate.cfg import *
from gen_tone import *
if __name__ == "__main__":
pygame.mixer.pre_init(frequency = int(SAMPLE_FREQ), channels = 1)
pygame.mixer.init()
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = g... |
e0c07b4078caaa4220040d0e8c4ed86e3a2bf087 | lextoumbourou/fabfile.py | lextoumbourou/fabfile.py | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def deploy():
"""
Deploy code to production
"""
git_repo = 'git://github.com/lextoum... | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
GIT_REPO = 'git://github.com/lextoumbourou/lextoumbourou.com.git'
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def initial_build():
"""
... | Move inital_build task into own function | Move inital_build task into own function
| Python | mit | lextoumbourou/lextoumbourou.com-old,lextoumbourou/lextoumbourou.com-old | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def deploy():
"""
Deploy code to production
"""
git_repo = 'git://github.com/lextoum... | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
GIT_REPO = 'git://github.com/lextoumbourou/lextoumbourou.com.git'
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def initial_build():
"""
... | <commit_before>import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def deploy():
"""
Deploy code to production
"""
git_repo = 'git://git... | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
GIT_REPO = 'git://github.com/lextoumbourou/lextoumbourou.com.git'
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def initial_build():
"""
... | import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def deploy():
"""
Deploy code to production
"""
git_repo = 'git://github.com/lextoum... | <commit_before>import os
from fabric.api import run, env, settings, cd, put, sudo
from fabric.contrib import files
import private
def prod():
env.hosts = list(private.PROD_SERVERS)
def local():
env.hosts = ['localhost']
def deploy():
"""
Deploy code to production
"""
git_repo = 'git://git... |
70efbd90d9d5601d368ddb5ea20a3b9910539b78 | members/urls.py | members/urls.py | from django.conf.urls import patterns, url
from django.contrib import auth
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url... | from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url(r'^search/(?P<name>.*)/$', 'mem... | Change url and views for login/logout to django Defaults | Change url and views for login/logout to django Defaults
| Python | mit | Hackfmi/Diaphanum,Hackfmi/Diaphanum | from django.conf.urls import patterns, url
from django.contrib import auth
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url... | from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url(r'^search/(?P<name>.*)/$', 'mem... | <commit_before>from django.conf.urls import patterns, url
from django.contrib import auth
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='lo... | from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url(r'^search/(?P<name>.*)/$', 'mem... | from django.conf.urls import patterns, url
from django.contrib import auth
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
url... | <commit_before>from django.conf.urls import patterns, url
from django.contrib import auth
urlpatterns = patterns('',
url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='lo... |
1aa050f2d50fb206ffb1a7d06e75cc2ba27cc91b | 1.py | 1.py | i = input()
floor = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1;
elif i[x] == ')':
floor -=1;
print(floor) | i = input()
floor = 0
instruction = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1
elif i[x] == ')':
floor -=1
if (floor < 0 and instruction == 0):
instruction = x+1
print("floor: %s" % floor)
print("basement entry: %s" % instruction) | Add second part of puzzle | Add second part of puzzle
| Python | mit | Walther/adventofcode,Walther/adventofcode,Walther/adventofcode | i = input()
floor = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1;
elif i[x] == ')':
floor -=1;
print(floor)Add second part of puzzle | i = input()
floor = 0
instruction = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1
elif i[x] == ')':
floor -=1
if (floor < 0 and instruction == 0):
instruction = x+1
print("floor: %s" % floor)
print("basement entry: %s" % instruction) | <commit_before>i = input()
floor = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1;
elif i[x] == ')':
floor -=1;
print(floor)<commit_msg>Add second part of puzzle<commit_after> | i = input()
floor = 0
instruction = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1
elif i[x] == ')':
floor -=1
if (floor < 0 and instruction == 0):
instruction = x+1
print("floor: %s" % floor)
print("basement entry: %s" % instruction) | i = input()
floor = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1;
elif i[x] == ')':
floor -=1;
print(floor)Add second part of puzzlei = input()
floor = 0
instruction = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1
elif i[x] == ')':
floor -=1
if (flo... | <commit_before>i = input()
floor = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1;
elif i[x] == ')':
floor -=1;
print(floor)<commit_msg>Add second part of puzzle<commit_after>i = input()
floor = 0
instruction = 0
for x in range(0, len(i)):
if i[x] == '(':
floor +=1
elif i... |
6bc6a07ee60f68e2003b5afcc752c3820a176541 | astropy/conftest.py | astropy/conftest.py | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | Add Cython to py.test header | Add Cython to py.test header | Python | bsd-3-clause | kelle/astropy,tbabej/astropy,lpsinger/astropy,joergdietrich/astropy,pllim/astropy,MSeifert04/astropy,AustereCuriosity/astropy,saimn/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,tbabej/astropy,mhvk/astropy,DougBurke/astropy,pllim/astropy,StuartLittlefair/astropy,astropy/astropy,kelle/astropy,AustereCuriosi... | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | <commit_before># this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
... | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | # this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
matplotlib.use... | <commit_before># this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the astropy tree.
from .tests.pytest_plugins import *
try:
import matplotlib
except ImportError:
pass
else:
... |
ad0f4e793ea010df243b87f42fff94037432e7b2 | mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py | mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | Fix fake game one script again | Fix fake game one script again
| Python | mit | WGBH/FixIt,WGBH/FixIt,WGBH/FixIt | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | <commit_before>import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phra... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | <commit_before>import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phra... |
1056bb70699f2c480f887b13dd28b412a7aeb6c5 | opps/core/admin.py | opps/core/admin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'channel', 'date_available', 'published']... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'date_available', 'published']
list_f... | Remove channel (list_display, list_filter and search_fields) on PublishableAdmin core | Remove channel (list_display, list_filter and search_fields) on PublishableAdmin core
| Python | mit | YACOWS/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'channel', 'date_available', 'published']... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'date_available', 'published']
list_f... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'channel', 'date_available... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'date_available', 'published']
list_f... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'channel', 'date_available', 'published']... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.ModelAdmin save_model method
It sets user (author) based on data from requet.
"""
list_display = ['title', 'channel', 'date_available... |
84eb438c966d5c2794a0842dccaefea726c0dbb9 | organizer/views.py | organizer/views.py | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | Tag Detail: get slug from URL pattern. | Ch05: Tag Detail: get slug from URL pattern.
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | <commit_before>from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = te... | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = template.render(c... | <commit_before>from django.http.response import HttpResponse
from django.template import Context, loader
from .models import Tag
def homepage(request):
tag_list = Tag.objects.all()
template = loader.get_template(
'organizer/tag_list.html')
context = Context({'tag_list': tag_list})
output = te... |
d9d0af04ea76c6c6bd346ce417e9feb61580c90e | nuitka/plugins/commercial/__init__.py | nuitka/plugins/commercial/__init__.py | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | Make it easier to integrate commercial plugins. | Plugins: Make it easier to integrate commercial plugins.
| Python | apache-2.0 | kayhayen/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | <commit_before># Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exce... | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | # Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | <commit_before># Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exce... |
badda02f6cc81a8c5670b6f53e67009a3cb8b66f | rmake/core/constants.py | rmake/core/constants.py | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | Relocate core status codes to the 450-499 range | Relocate core status codes to the 450-499 range
| Python | apache-2.0 | sassoftware/rmake3,sassoftware/rmake3,sassoftware/rmake3 | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... |
cb408af79e46f32eca7337545f87fa169b32cba5 | n6/run_tests.py | n6/run_tests.py | #!/usr/bin/env python3
#
# Affero GPL
#
import unittest
def alltests():
return unittest.TestSuite([
])
unittest.TextTestRunner(verbosity = 2).run(alltests())
| Set up run tests file. | Set up run tests file.
| Python | agpl-3.0 | JasonCozens/en | Set up run tests file. | #!/usr/bin/env python3
#
# Affero GPL
#
import unittest
def alltests():
return unittest.TestSuite([
])
unittest.TextTestRunner(verbosity = 2).run(alltests())
| <commit_before><commit_msg>Set up run tests file.<commit_after> | #!/usr/bin/env python3
#
# Affero GPL
#
import unittest
def alltests():
return unittest.TestSuite([
])
unittest.TextTestRunner(verbosity = 2).run(alltests())
| Set up run tests file.#!/usr/bin/env python3
#
# Affero GPL
#
import unittest
def alltests():
return unittest.TestSuite([
])
unittest.TextTestRunner(verbosity = 2).run(alltests())
| <commit_before><commit_msg>Set up run tests file.<commit_after>#!/usr/bin/env python3
#
# Affero GPL
#
import unittest
def alltests():
return unittest.TestSuite([
])
unittest.TextTestRunner(verbosity = 2).run(alltests())
| |
ce67500ec566784f6f8883e1ffcaef6ad768d810 | 2018/05/solve.py | 2018/05/solve.py | data = open("input.txt").read().strip()
import re
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
data = data.rep... | data = open("input.txt").read().strip()
import re
import string
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
d... | Fix bug with omitting v | Fix bug with omitting v
| Python | mit | lamperi/aoc,lamperi/aoc,lamperi/aoc,lamperi/aoc,lamperi/aoc | data = open("input.txt").read().strip()
import re
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
data = data.rep... | data = open("input.txt").read().strip()
import re
import string
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
d... | <commit_before>data = open("input.txt").read().strip()
import re
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
... | data = open("input.txt").read().strip()
import re
import string
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
d... | data = open("input.txt").read().strip()
import re
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
data = data.rep... | <commit_before>data = open("input.txt").read().strip()
import re
from collections import Counter
def solve1(data):
prevData = None
while data != prevData:
prevData = data
for a,b in zip(data, data[1:]):
if (a != b and a == b.lower()) or (a != b and a.lower() == b):
... |
640f54d769a01b3707591f76914c8e4cf5394eaa | micro/process_options.py | micro/process_options.py | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | Update copyright years of the interpreter | Update copyright years of the interpreter
| Python | mit | thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | <commit_before>import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
... | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
parser.add_argu... | <commit_before>import help_formatter
import argparse
def process_options():
parser = _make_options_parser()
return parser.parse_args()
def _make_options_parser():
parser = argparse.ArgumentParser(
prog='micro',
add_help=False,
formatter_class=help_formatter.HelpFormatter
)
... |
c43ddf1f36535604167e496508d242a15c813496 | roamer/main.py | roamer/main.py | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | Fix references not available after pulling up two instances of roamer | Fix references not available after pulling up two instances of roamer
| Python | mit | abaldwin88/roamer | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | <commit_before>#!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
... | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | #!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
argh
"""
... | <commit_before>#!/usr/bin/env python
"""
argh
"""
import os
from roamer.python_edit import file_editor
from roamer.directory import Directory
from roamer.edit_directory import EditDirectory
from roamer.engine import Engine
from roamer.record import Record
from roamer.constant import TRASH_DIR
def main():
"""
... |
0fa565b79a2776cb2878d6a44299b25764150f15 | pywind/__init__.py | pywind/__init__.py | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.0'
| """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.1'
| Update to next version number following release of 1.1.0 | Update to next version number following release of 1.1.0
| Python | unlicense | zathras777/pywind,zathras777/pywind | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.0'
Update to next version number following release of 1.1.0 | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.1'
| <commit_before>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.0'
<commit_msg>Update to next version number following release of 1.1.0<commit_after> | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.1'
| """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.0'
Update to next version number following release of 1.1.0""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.1'
| <commit_before>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.0'
<commit_msg>Update to next version number following release of 1.1.0<commit_after>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.1.1'... |
2aef43fcd44f075ff718475ea57ae23711de02aa | event/models.py | event/models.py | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
def _... | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
class... | Add Artist ordering by name | Add Artist ordering by name
| Python | mit | FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
def _... | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
class... | <commit_before>from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
... | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
class... | from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
)
def _... | <commit_before>from django.db import models
class Artist(models.Model):
name = models.CharField(max_length=100)
image_url = models.URLField(blank=True)
thumb_url = models.URLField(blank=True)
events = models.ManyToManyField(
'event.Event',
related_name='artists',
blank=True,
... |
aebc3440c98ee2b4cc5f880d648e106e1f9d6b9d | source/urls.py | source/urls.py | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet)
router.register(r'tolausers', TolaUserViewset)
router.register(r'countries'... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet, base_name="my_task")
router.register(r'tolausers', TolaUserViewset)
router.... | Add the base_name to the API routers for the custom query_set | Add the base_name to the API routers for the custom query_set
| Python | apache-2.0 | toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet)
router.register(r'tolausers', TolaUserViewset)
router.register(r'countries'... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet, base_name="my_task")
router.register(r'tolausers', TolaUserViewset)
router.... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet)
router.register(r'tolausers', TolaUserViewset)
router.regist... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet, base_name="my_task")
router.register(r'tolausers', TolaUserViewset)
router.... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet)
router.register(r'tolausers', TolaUserViewset)
router.register(r'countries'... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from task.views import *
from userprofile.views import *
router = routers.DefaultRouter()
router.register(r'tasks', TaskListViewSet)
router.register(r'tolausers', TolaUserViewset)
router.regist... |
a099eab75245005527e03fb5278a49a6d565c8f9 | wagtailstartproject/project_template/tests/test_selenium/test_pages.py | wagtailstartproject/project_template/tests/test_selenium/test_pages.py | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
fixtures = ['basic_site.json']
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
... | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
url = page.relative_url(page.get_s... | Remove unnecessary fixtures attribute, already set by base class. | Remove unnecessary fixtures attribute, already set by base class.
| Python | mit | leukeleu/wagtail-startproject,leukeleu/wagtail-startproject | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
fixtures = ['basic_site.json']
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
... | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
url = page.relative_url(page.get_s... | <commit_before>from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
fixtures = ['basic_site.json']
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pag... | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
url = page.relative_url(page.get_s... | from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
fixtures = ['basic_site.json']
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pages:
... | <commit_before>from wagtail.wagtailcore.models import Page
from .base import SeleniumTestCase
class PagesTest(SeleniumTestCase):
fixtures = ['basic_site.json']
def test_wagtail_pages(self):
"""Check if all Wagtail pages can be retrieved"""
pages = Page.objects.live()
for page in pag... |
104da4df7e0cd09d32457cf56fc00dc96fcdbdac | euler/p005.py | euler/p005.py | """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
"""
from fractions import gcd
from functools import reduce
MAXIMUM = 20
def compute(maximum=MAXIMUM):
"""Compute the LCM of all integers from 1 to `maximum`."""
return int(reduce(lambda x, y: (x*y)/gcd(x, y), range(1, maximum + 1)))
| """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
gcd, lcm, and lcmm functions by J.F. Sebastian.
http://stackoverflow.com/a/147539/6119465
"""
from functools import reduce
MAXIMUM = 20
def gcd(num1, num2):
"""Return greatest common divisor using Euclid's Algorithm."""
while num2:
... | Replace deprecated fractions.gcd with Euclid's Algorithm | Replace deprecated fractions.gcd with Euclid's Algorithm
| Python | mit | 2Cubed/ProjectEuler | """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
"""
from fractions import gcd
from functools import reduce
MAXIMUM = 20
def compute(maximum=MAXIMUM):
"""Compute the LCM of all integers from 1 to `maximum`."""
return int(reduce(lambda x, y: (x*y)/gcd(x, y), range(1, maximum + 1)))
... | """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
gcd, lcm, and lcmm functions by J.F. Sebastian.
http://stackoverflow.com/a/147539/6119465
"""
from functools import reduce
MAXIMUM = 20
def gcd(num1, num2):
"""Return greatest common divisor using Euclid's Algorithm."""
while num2:
... | <commit_before>"""Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
"""
from fractions import gcd
from functools import reduce
MAXIMUM = 20
def compute(maximum=MAXIMUM):
"""Compute the LCM of all integers from 1 to `maximum`."""
return int(reduce(lambda x, y: (x*y)/gcd(x, y), range(1, ... | """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
gcd, lcm, and lcmm functions by J.F. Sebastian.
http://stackoverflow.com/a/147539/6119465
"""
from functools import reduce
MAXIMUM = 20
def gcd(num1, num2):
"""Return greatest common divisor using Euclid's Algorithm."""
while num2:
... | """Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
"""
from fractions import gcd
from functools import reduce
MAXIMUM = 20
def compute(maximum=MAXIMUM):
"""Compute the LCM of all integers from 1 to `maximum`."""
return int(reduce(lambda x, y: (x*y)/gcd(x, y), range(1, maximum + 1)))
... | <commit_before>"""Solution to Project Euler Problem 5
https://projecteuler.net/problem=5
"""
from fractions import gcd
from functools import reduce
MAXIMUM = 20
def compute(maximum=MAXIMUM):
"""Compute the LCM of all integers from 1 to `maximum`."""
return int(reduce(lambda x, y: (x*y)/gcd(x, y), range(1, ... |
740762be1565690f78111861afe3152bdab4fadc | tests/test_soi.py | tests/test_soi.py | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | Change unit test syntax for pandas > 0.12.0 compat | Change unit test syntax for pandas > 0.12.0 compat
| Python | bsd-3-clause | amacd31/bom_data_parser,amacd31/bom_data_parser | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | <commit_before>import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def... | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def test_soi(self)... | <commit_before>import os
import numpy as np
import pandas as pd
import unittest
from urllib2 import urlopen
from bom_data_parser import read_soi_html
class SOITest(unittest.TestCase):
def setUp(self):
self.test_soi_file = os.path.join(os.path.dirname(__file__), 'data', 'SOI', 'soiplaintext.html')
def... |
638e6a0f5b906e9cf63d95728da328b24f506173 | ananas/default/__init__.py | ananas/default/__init__.py | __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
| __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
from .announce import AnnounceBot
| Add announcebot to default module root for ease of import | Add announcebot to default module root for ease of import
| Python | mit | Chronister/ananas | __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
Add announcebot to default module root for ease of import | __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
from .announce import AnnounceBot
| <commit_before>__all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
<commit_msg>Add announcebot to default module root for ease of import<commit_after> | __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
from .announce import AnnounceBot
| __all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
Add announcebot to default module root for ease of import__all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
from .announce import AnnounceBot
| <commit_before>__all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
<commit_msg>Add announcebot to default module root for ease of import<commit_after>__all__ = ["roll", "tracery"]
from .roll import DiceBot
from .tracery import TraceryBot
from .announce import AnnounceBot
|
de96fab9b84c66b1d3bc3c200713bb595bce81b3 | examples/chart_maker/my_chart.py | examples/chart_maker/my_chart.py | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
self.add_data_point("Failed", 1, co... | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_presentation()
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
... | Expand on the Chart Maker example tests | Expand on the Chart Maker example tests
| Python | mit | mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
self.add_data_point("Failed", 1, co... | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_presentation()
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
... | <commit_before>from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
self.add_data_point(... | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_presentation()
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
... | from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
self.add_data_point("Failed", 1, co... | <commit_before>from seleniumbase import BaseCase
class MyChartMakerClass(BaseCase):
def test_chart_maker(self):
self.create_pie_chart(title="Automated Tests")
self.add_data_point("Passed", 7, color="#95d96f")
self.add_data_point("Untested", 2, color="#eaeaea")
self.add_data_point(... |
e4d271011ff352d4fa83c252739a71dc74a6c0d8 | packages/Python/lldbsuite/test/lang/swift/protocols/class_protocol/TestClassConstrainedProtocolArgument.py | packages/Python/lldbsuite/test/lang/swift/protocols/class_protocol/TestClassConstrainedProtocolArgument.py | """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
| """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
import lldbsuite.test.decorators as decorators
lldbinline.MakeInlineTest(
__file__, globals(), decorators=[decorators.skipUnlessDarwin])
| Mark a test relying on foundation as darwin only. | [SwiftLanguageRuntime] Mark a test relying on foundation as darwin only.
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
[SwiftLanguageRuntime] Mark a test relying on foundation as darwin only. | """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
import lldbsuite.test.decorators as decorators
lldbinline.MakeInlineTest(
__file__, globals(), decorators=[decorators.skipUnlessDarwin])
| <commit_before>"""
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
<commit_msg>[SwiftLanguageRuntime] Mark a test relying on foundation as darwin only.<commit_after> | """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
import lldbsuite.test.decorators as decorators
lldbinline.MakeInlineTest(
__file__, globals(), decorators=[decorators.skipUnlessDarwin])
| """
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
[SwiftLanguageRuntime] Mark a test relying on foundation as darwin only."""
Test that variables passed in as a class constraine... | <commit_before>"""
Test that variables passed in as a class constrained protocol type
are correctly printed.
"""
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
<commit_msg>[SwiftLanguageRuntime] Mark a test relying on foundation as darwin only.<commit_after>"""
Test that ... |
01ed98138f9be1f55c5f46e5e073dde4271cc277 | useraudit/urls.py | useraudit/urls.py | from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'/reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
| from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
| Remove / from the beginning of the '/reactivate' url | Remove / from the beginning of the '/reactivate' url
Fixes #10
| Python | bsd-3-clause | muccg/django-useraudit,muccg/django-useraudit,muccg/django-useraudit | from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'/reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
Remove / from the beginning of the '/reactivate' url
Fixes #10 | from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
| <commit_before>from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'/reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
<commit_msg>Remove / from the beginning of the '/reactivate' url
Fixes #10<commit_after> | from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
| from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'/reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
Remove / from the beginning of the '/reactivate' url
Fixes #10from django.conf.urls import include, url
from .v... | <commit_before>from django.conf.urls import include, url
from .views import reactivate_user
app_name = "useraudit"
urlpatterns = [
url(r'/reactivate/(?P<user_id>\d+)[/]?$', reactivate_user, name="reactivate_user"),
]
<commit_msg>Remove / from the beginning of the '/reactivate' url
Fixes #10<commit_after>from dja... |
2ba4e34af7a1078d4c19d5f964df42d291f9862a | slaveapi/clients/pdu.py | slaveapi/clients/pdu.py | class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
pass
| class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
raise NotImplementedError()
| Mark PDUs as not implemented to avoid false positives in reboots. | Mark PDUs as not implemented to avoid false positives in reboots.
| Python | mpl-2.0 | lundjordan/slaveapi | class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
pass
Mark PDUs as not implemented to avoid false positives in reboots. | class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
raise NotImplementedError()
| <commit_before>class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
pass
<commit_msg>Mark PDUs as not implemented to avoid false positives in reboots.<commit... | class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
raise NotImplementedError()
| class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
pass
Mark PDUs as not implemented to avoid false positives in reboots.class PDU(object):
def __init_... | <commit_before>class PDU(object):
def __init__(self, fqdn, port):
self.fqdn = fqdn
self.port = port
def off(self):
pass
def on(self):
pass
def powercycle(self, delay=None):
pass
<commit_msg>Mark PDUs as not implemented to avoid false positives in reboots.<commit... |
4115cee1aa913346d5495230a98a5e723de9f5ab | bilgisayfam/utils/encoding.py | bilgisayfam/utils/encoding.py | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | Make normalize lower case as well. | Make normalize lower case as well.
| Python | mit | tayfun/bilgisayfam,tayfun/bilgisayfam,tayfun/bilgisayfam | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | <commit_before># -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
... | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | # -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
ord(u"Ü"): u... | <commit_before># -*- coding: utf-8 -*-
"""
Provides a translation method that strips Turkish characters and replaces
them with ASCII equivalents.
"""
translate_table = {
ord(u"ğ"): u"g",
ord(u"ü"): u"u",
ord(u"ş"): u"s",
ord(u"ı"): u"i",
ord(u"ö"): u"o",
ord(u"ç"): u"c",
ord(u"Ğ"): u"G",
... |
18545c519c23e9463fa7558191552e69304dfef7 | blog/myblog/tests.py | blog/myblog/tests.py | import datetime
from django.test import TestCase
from django.utils import timezone
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""
def setUp(self):
self.joe = Auth... | import datetime
from django.test import TestCase
from django.utils import timezone
from django.core.urlresolvers import reverse
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""... | Add test for article view | Add test for article view
| Python | mit | mileto94/Django-tutorial,mileto94/Django-tutorial | import datetime
from django.test import TestCase
from django.utils import timezone
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""
def setUp(self):
self.joe = Auth... | import datetime
from django.test import TestCase
from django.utils import timezone
from django.core.urlresolvers import reverse
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""... | <commit_before>import datetime
from django.test import TestCase
from django.utils import timezone
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""
def setUp(self):
... | import datetime
from django.test import TestCase
from django.utils import timezone
from django.core.urlresolvers import reverse
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""... | import datetime
from django.test import TestCase
from django.utils import timezone
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""
def setUp(self):
self.joe = Auth... | <commit_before>import datetime
from django.test import TestCase
from django.utils import timezone
from myblog.models import Article, Author
class ArticleMethodTest(TestCase):
"""docstring for ArticleMethodTest - it shoult return False
if it was published in past or future"""
def setUp(self):
... |
897bbe8b4d70ca68fb0336774b8c549ed2fe4c3e | buildtools/cleanup-ghpages.py | buildtools/cleanup-ghpages.py | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | Remove greenkeeper directories from gh-pages | Remove greenkeeper directories from gh-pages
| Python | mit | camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | <commit_before>#! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json(... | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | #! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json()
expec... | <commit_before>#! python
import sys
import requests
import urllib3
from os import listdir
from shutil import rmtree
from json import loads
urllib3.disable_warnings()
def main():
url = "https://api.github.com/repos/{}/ngeo/branches?per_page=100".format(sys.argv[1])
try:
json = requests.get(url).json(... |
7c7aa833dd79c53dbd921f5ed59cf2620342dbe3 | python/ShortenUrl.py | python/ShortenUrl.py |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... | Fix tiny errors in Python code | Fix tiny errors in Python code
| Python | mit | rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... | <commit_before>
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.inde... |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... |
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.indexFile)
shortu... | <commit_before>
# This is fairly specific to using a Yourls server: see http://yourls.org/
import urllib
import urllib2
import Util
SHORTEN_PART = 'yourls-api.php'
def shorten(url, config):
def shortenerUrl(part):
return '%s/%s' % (config.shortenUrl, part)
index = Util.getAndIncrementIndexFile(config.inde... |
0e68fd50428ceaf53e00e22c11a45ec98185e738 | avocado/export/__init__.py | avocado/export/__init__.py | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
... | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
reg... | Replace exporter registry keys with short_name derivative | Replace exporter registry keys with short_name derivative
Fix #203
Signed-off-by: Byron Ruth <[email protected]>
| Python | bsd-2-clause | murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
... | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
reg... | <commit_before>from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_i... | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
reg... | from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_instance=False)
... | <commit_before>from avocado.core import loader
from avocado.conf import OPTIONAL_DEPS
from _base import BaseExporter # noqa
from _csv import CSVExporter
from _sas import SASExporter
from _r import RExporter
from _json import JSONExporter
from _html import HTMLExporter # noqa
registry = loader.Registry(register_i... |
d55389580160c4585c131537c04c4045a38ea134 | fluxghost/http_server_base.py | fluxghost/http_server_base.py |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... | Add auto select port function | Add auto select port function
| Python | agpl-3.0 | flux3dp/fluxghost,flux3dp/fluxghost,flux3dp/fluxghost,flux3dp/fluxghost |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... | <commit_before>
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, addres... |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... |
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, address, backlog=10):... | <commit_before>
from select import select
import logging
import socket
logger = logging.getLogger("HTTPServer")
from fluxghost.http_handlers.websocket_handler import WebSocketHandler
from fluxghost.http_handlers.file_handler import FileHandler
class HttpServerBase(object):
def __init__(self, assets_path, addres... |
ffdd11e7aeed179868618dd7b4666e5e149962b0 | solar/solar/core/handlers/__init__.py | solar/solar/core/handlers/__init__.py | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | Add lost handler for puppet | Add lost handler for puppet
| Python | apache-2.0 | loles/solar,openstack/solar,zen/solar,dshulyak/solar,loles/solar,loles/solar,CGenie/solar,torgartor21/solar,pigmej/solar,Mirantis/solar,torgartor21/solar,zen/solar,Mirantis/solar,pigmej/solar,loles/solar,openstack/solar,pigmej/solar,zen/solar,Mirantis/solar,Mirantis/solar,zen/solar,openstack/solar,CGenie/solar,dshulyak... | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | <commit_before># -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ans... | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | # -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ansible': AnsibleT... | <commit_before># -*- coding: utf-8 -*-
from solar.core.handlers.ansible_template import AnsibleTemplate
from solar.core.handlers.ansible_playbook import AnsiblePlaybook
from solar.core.handlers.base import Empty
from solar.core.handlers.puppet import Puppet
from solar.core.handlers.shell import Shell
HANDLERS = {'ans... |
d3beb067abca8a2c014ca8039556181881310392 | app/groups/utils.py | app/groups/utils.py | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | Switch to default mail from variable | Switch to default mail from variable
| Python | bsd-3-clause | nikdoof/test-auth | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | <commit_before>from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people us... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people using a standard ... | <commit_before>from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
def send_group_mail(request, to_email, subject, email_text_template, email_html_template):
"""Sends a email to a group of people us... |
f3803452c669aa35ca71f00c18f613e276a70ca2 | scripts/add_users.py | scripts/add_users.py | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", 'emailAddress': "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", "emailAddress": "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | Fix example of how to run script, and make it executable | Fix example of how to run script, and make it executable
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", 'emailAddress': "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", "emailAddress": "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | <commit_before>#!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", 'emailAddress': "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api... | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", "emailAddress": "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | #!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", 'emailAddress': "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api_endpoint> <dat... | <commit_before>#!/usr/bin/env python
"""
Add a series of users from a file of JSON objects, one per line.
The JSON user object lines can have the following fields:
{"name": "A. Non", "password": "pass12345", 'emailAddress': "[email protected]", "role": "supplier", "supplierId": 12345}
Usage:
add-users.py <data_api... |
0ffd3699fc696bca7d7bd1b35870aa66fb0598ef | lms/djangoapps/instructor_task/admin.py | lms/djangoapps/instructor_task/admin.py | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instruct... | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instructor... | Add ability to manually fail instructor tasks in batches. | Add ability to manually fail instructor tasks in batches.
When an InstructorTask is stuck in QUEUING (say if there was a
problem with celery), the support team needs to manually intervene
and mark the task as "FAILED" so that new tasks of that type can
be created for that course. This is usually done one at a time,
bu... | Python | agpl-3.0 | EDUlib/edx-platform,eduNEXT/edunext-platform,stvstnfrd/edx-platform,arbrandes/edx-platform,stvstnfrd/edx-platform,angelapper/edx-platform,arbrandes/edx-platform,eduNEXT/edx-platform,edx/edx-platform,eduNEXT/edx-platform,EDUlib/edx-platform,eduNEXT/edunext-platform,eduNEXT/edunext-platform,angelapper/edx-platform,edx/ed... | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instruct... | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instructor... | <commit_before>"""
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models ... | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instructor... | """
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models import Instruct... | <commit_before>"""
Basic admin screens to search and edit InstructorTasks.
This will mostly involve searching by course_id or task_id and manually failing
a task.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from .config.models import GradeReportSetting
from .models ... |
7e50594c47ff0f8fdaaa3c6fb3a7b6ec222fc9fa | hgallpaths.py | hgallpaths.py | # hgallpaths.py - pull and push too all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''push and pull too all paths'''
from mercurial import commands
... | # hgallpaths.py - pull and push to all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# Released under the terms of the BSD License. See LICENSE.txt for details.
'''push and pull to all paths'''
from mercurial import commands
cmdtable = {}
def do_command(command, path_kw, ui, *args, *... | Update license header to reference BSD. | Update license header to reference BSD.
| Python | bsd-2-clause | keegancsmith/hgallpaths | # hgallpaths.py - pull and push too all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''push and pull too all paths'''
from mercurial import commands
... | # hgallpaths.py - pull and push to all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# Released under the terms of the BSD License. See LICENSE.txt for details.
'''push and pull to all paths'''
from mercurial import commands
cmdtable = {}
def do_command(command, path_kw, ui, *args, *... | <commit_before># hgallpaths.py - pull and push too all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''push and pull too all paths'''
from mercurial im... | # hgallpaths.py - pull and push to all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# Released under the terms of the BSD License. See LICENSE.txt for details.
'''push and pull to all paths'''
from mercurial import commands
cmdtable = {}
def do_command(command, path_kw, ui, *args, *... | # hgallpaths.py - pull and push too all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''push and pull too all paths'''
from mercurial import commands
... | <commit_before># hgallpaths.py - pull and push too all paths
#
# Copyright 2012 Keegan Carruthers-Smith <[email protected]>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''push and pull too all paths'''
from mercurial im... |
d7b5cd3c3ef51aef5264542fae03322955bd5ca8 | appengine_config.py | appengine_config.py | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | Switch Django version from 1.0 to 1.1 | Switch Django version from 1.0 to 1.1
| Python | apache-2.0 | ligthyear/quick-check,ligthyear/quick-check | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | <commit_before>"""Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return ... | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Appstats... | <commit_before>"""Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return ... |
ca8263ecf33798acc01bb4a5f5aeb3d8005da026 | karmaworld/apps/users/views.py | karmaworld/apps/users/views.py | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | Fix to make user profile display | Fix to make user profile display
| Python | agpl-3.0 | FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | <commit_before>#!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = Us... | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = User
context_... | <commit_before>#!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2013 FinalsClub Foundation
from django.contrib.auth.models import User
from django.views.generic import TemplateView
from django.views.generic.detail import SingleObjectMixin
class ProfileView(TemplateView, SingleObjectMixin):
model = Us... |
b0904677e9687932099406a38cc7cd8f7ba67573 | examples/cifar-autoencoder.py | examples/cifar-autoencoder.py | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | Access weights using new interface. | Access weights using new interface.
| Python | mit | chrinide/theanets,lmjohns3/theanets,devdoer/theanets | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | <commit_before>#!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-lay... | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | #!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-layer features')
... | <commit_before>#!/usr/bin/env python
import climate
import matplotlib.pyplot as plt
import theanets
from utils import load_cifar, plot_layers, plot_images
g = climate.add_arg_group('CIFAR Example')
g.add_argument('--features', type=int, default=32, metavar='N',
help='train a model using N^2 hidden-lay... |
c99c275e1304335d210054c3838dc4bfe1618ac9 | stl/__init__.py | stl/__init__.py |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... |
import stl.ascii
import stl.binary
from stl.types import Solid, Facet, Vector3d
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
d... | Make the types available in the main "stl" module. | Make the types available in the main "stl" module.
| Python | mit | ng110/python-stl,apparentlymart/python-stl,zachwick/python-stl |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... |
import stl.ascii
import stl.binary
from stl.types import Solid, Facet, Vector3d
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
d... | <commit_before>
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
... |
import stl.ascii
import stl.binary
from stl.types import Solid, Facet, Vector3d
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
d... |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... | <commit_before>
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
... |
43e6a2e3bf90f5edee214d1511a6805a67f79595 | stl/__init__.py | stl/__init__.py |
import stl.ascii
import stl.binary
def parse_ascii_file(file):
return stl.ascii.parse(file)
def parse_binary_file(file):
return stl.binary.parse(file)
def parse_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def parse_binary_string(data):
from Stri... |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... | Rename the reading functions "read_" rather than "parse_". | Rename the reading functions "read_" rather than "parse_".
"Parsing" is what they do internally, but "read" is a better opposite to
"write" and matches the name of the underlying raw file operation.
| Python | mit | apparentlymart/python-stl,zachwick/python-stl,ng110/python-stl |
import stl.ascii
import stl.binary
def parse_ascii_file(file):
return stl.ascii.parse(file)
def parse_binary_file(file):
return stl.binary.parse(file)
def parse_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def parse_binary_string(data):
from Stri... |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... | <commit_before>
import stl.ascii
import stl.binary
def parse_ascii_file(file):
return stl.ascii.parse(file)
def parse_binary_file(file):
return stl.binary.parse(file)
def parse_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def parse_binary_string(data)... |
import stl.ascii
import stl.binary
def read_ascii_file(file):
return stl.ascii.parse(file)
def read_binary_file(file):
return stl.binary.parse(file)
def read_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def read_binary_string(data):
from StringIO... |
import stl.ascii
import stl.binary
def parse_ascii_file(file):
return stl.ascii.parse(file)
def parse_binary_file(file):
return stl.binary.parse(file)
def parse_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def parse_binary_string(data):
from Stri... | <commit_before>
import stl.ascii
import stl.binary
def parse_ascii_file(file):
return stl.ascii.parse(file)
def parse_binary_file(file):
return stl.binary.parse(file)
def parse_ascii_string(data):
from StringIO import StringIO
return parse_ascii_file(StringIO(data))
def parse_binary_string(data)... |
dbe8d7a4f43521e7aeba8f2670e70ac91f40ec3c | enthought/mayavi/tests/test_mlab_scene_model.py | enthought/mayavi/tests/test_mlab_scene_model.py | """
Testing the MlabSceneModel
"""
import unittest
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
###########################################################... | """
Testing the MlabSceneModel
"""
import unittest
import numpy as np
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
#######################################... | Fix a failing test due to refactor | BUG: Fix a failing test due to refactor
| Python | bsd-3-clause | dmsurti/mayavi,liulion/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,liulion/mayavi | """
Testing the MlabSceneModel
"""
import unittest
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
###########################################################... | """
Testing the MlabSceneModel
"""
import unittest
import numpy as np
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
#######################################... | <commit_before>"""
Testing the MlabSceneModel
"""
import unittest
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
############################################... | """
Testing the MlabSceneModel
"""
import unittest
import numpy as np
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
#######################################... | """
Testing the MlabSceneModel
"""
import unittest
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
###########################################################... | <commit_before>"""
Testing the MlabSceneModel
"""
import unittest
from enthought.traits.api import HasTraits, Instance
from enthought.mayavi.tools.mlab_scene_model import MlabSceneModel
from enthought.mayavi import mlab
from test_mlab_integration import TestMlabNullEngine
############################################... |
2c4c527e6bb63f7db7a1c2d32f71b76fad65f92a | src/core/tests/test_callexplorer.py | src/core/tests/test_callexplorer.py | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | Add another test for CallExplorer.history_glob | Add another test for CallExplorer.history_glob
| Python | bsd-3-clause | abortz/saycbridge,eseidel/saycbridge,eseidel/saycbridge,abortz/saycbridge,abortz/saycbridge,eseidel/saycbridge,abortz/saycbridge,abortz/saycbridge | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | <commit_before># Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_stri... | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | # Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_string, histories):... | <commit_before># Copyright (c) 2013 The SAYCBridge 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 unittest2
from core.callexplorer import *
class CallExplorerTest(unittest2.TestCase):
def _assert_histories(self, glob_stri... |
a9b22b76203467ec63ce0592e32498cfecdedca3 | tests/config.py | tests/config.py | from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
self.api = API(self.auth)
self.api.co... | import sys
sys.path.append("../ideascaly")
from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
s... | Add the directory of the project module to system path | Add the directory of the project module to system path
| Python | mit | joausaga/ideascaly | from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
self.api = API(self.auth)
self.api.co... | import sys
sys.path.append("../ideascaly")
from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
s... | <commit_before>from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
self.api = API(self.auth)
... | import sys
sys.path.append("../ideascaly")
from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
s... | from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
self.api = API(self.auth)
self.api.co... | <commit_before>from ideascaly.auth import AuthNonSSO
from ideascaly.api import API
import ConfigParser
import unittest
config = ConfigParser.ConfigParser()
config.read('config')
class IdeascalyTestCase(unittest.TestCase):
def setUp(self):
self.auth = create_auth()
self.api = API(self.auth)
... |
4f5b171b972b2255dfc3cdb8eea8b4a2745ae437 | centinel/backend.py | centinel/backend.py | import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
if req.status_code != requests.codes.ok:
raise req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
... | import os
import glob
import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
return request("/experiments")
... | Send results to the server | Send results to the server
| Python | mit | rpanah/centinel,rpanah/centinel,lianke123321/centinel,JASONews/centinel,iclab/centinel,iclab/centinel,lianke123321/centinel,rpanah/centinel,iclab/centinel,Ashish1805/centinel,ben-jones/centinel,lianke123321/centinel | import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
if req.status_code != requests.codes.ok:
raise req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
... | import os
import glob
import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
return request("/experiments")
... | <commit_before>import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
if req.status_code != requests.codes.ok:
raise req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_ex... | import os
import glob
import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
return request("/experiments")
... | import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
if req.status_code != requests.codes.ok:
raise req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_experiments():
... | <commit_before>import requests
import config
def request(slug):
url = "%s%s" % (config.server_url, slug)
req = requests.get(url)
if req.status_code != requests.codes.ok:
raise req.raise_for_status()
return req.json()
def get_recommended_versions():
return request("/versions")
def get_ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.