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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c8921cf12418762c17d0b858ea2e134f292b2838 | fireplace/cards/wog/neutral_epic.py | fireplace/cards/wog/neutral_epic.py | from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
| from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
class OG_272:
"Twilight Summoner"
deathrattle = Summon(CONTROLLER, "OG_272t")
class OG_337:
"Cyclopian Horror"
play = Buff(SELF, "OG_337e") * Co... | Implement Twilight Summoner and Cyclopian Horror | Implement Twilight Summoner and Cyclopian Horror
| Python | agpl-3.0 | beheh/fireplace,NightKev/fireplace,jleclanche/fireplace | from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
Implement Twilight Summoner and Cyclopian Horror | from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
class OG_272:
"Twilight Summoner"
deathrattle = Summon(CONTROLLER, "OG_272t")
class OG_337:
"Cyclopian Horror"
play = Buff(SELF, "OG_337e") * Co... | <commit_before>from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
<commit_msg>Implement Twilight Summoner and Cyclopian Horror<commit_after> | from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
class OG_272:
"Twilight Summoner"
deathrattle = Summon(CONTROLLER, "OG_272t")
class OG_337:
"Cyclopian Horror"
play = Buff(SELF, "OG_337e") * Co... | from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
Implement Twilight Summoner and Cyclopian Horrorfrom ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff... | <commit_before>from ..utils import *
##
# Minions
class OG_271:
"Scaled Nightmare"
events = OWN_TURN_BEGIN.on(Buff(SELF, "OG_271e"))
class OG_271e:
atk = lambda self, i: i * 2
<commit_msg>Implement Twilight Summoner and Cyclopian Horror<commit_after>from ..utils import *
##
# Minions
class OG_271:
"Scaled Ni... |
923d57d91b99fc3ac052d46de0314e7559b008a5 | lessons/lesson-2.04/models_example.py | lessons/lesson-2.04/models_example.py | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Clumn(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | Fix typo in example model | Fix typo in example model
| Python | mit | tylerdave/OpenAPI-Tutorial,tylerdave/OpenAPI-Tutorial | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Clumn(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | <commit_before>import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Clumn(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get(... | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Clumn(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get('details')
... | <commit_before>import arrow
from betterapis import db
class Track(db.Model, SimpleSerializing):
id = db.Column(db.Integer, primary_key=True)
name = db.Clumn(db.String)
details = db.Column(db.String)
def __init__(self, **kwargs):
self.name = kwargs.get('name')
self.details = kwargs.get(... |
af3515c8354dd525c2889eda75bfbc5cb7e2ecbf | massa/errors.py | massa/errors.py | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify({'message': e.message}), 404... | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify(e.as_dict()), 404
def inva... | Add method to retrieve the DomainError as a dict. | Add method to retrieve the DomainError as a dict. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify({'message': e.message}), 404... | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify(e.as_dict()), 404
def inva... | <commit_before># -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify({'message': e... | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify(e.as_dict()), 404
def inva... | # -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify({'message': e.message}), 404... | <commit_before># -*- coding: utf-8 -*-
from flask import jsonify
def register_error_handlers(app):
app.register_error_handler(EntityNotFoundError, entity_not_found_handler)
app.register_error_handler(InvalidInputError, invalid_input_handler)
def entity_not_found_handler(e):
return jsonify({'message': e... |
8c0dd17bb633f56cb1ad8450759622ad75a524bc | config-example.py | config-example.py |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "0.0.0.0"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is b... |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "127.0.0.1"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is... | Change default development server listen address back to 127.0.0.1 | Change default development server listen address back to 127.0.0.1
| Python | lgpl-2.1 | minetest/master-server,minetest/master-server,minetest/master-server |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "0.0.0.0"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is b... |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "127.0.0.1"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is... | <commit_before>
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "0.0.0.0"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when th... |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "127.0.0.1"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is... |
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "0.0.0.0"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when the
# server is b... | <commit_before>
# Enables detailed tracebacks and an interactive Python console on errors.
# Never use in production!
#DEBUG = True
# Address for development server to listen on
#HOST = "0.0.0.0"
# Port for development server to listen on
#PORT = 5000
# Makes the server more performant at sending static files when th... |
04e64fea6e11a188a53d0b8d69ef97686868be1c | tests/py_ext_tests/test_png.py | tests/py_ext_tests/test_png.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0),(255,0,255))
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
from faint import png
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0... | Use the png module in test. | Use the png module in test.
| Python | apache-2.0 | lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0),(255,0,255))
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
from faint import png
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0),(255,0... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
from faint import png
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0),(255,0,255))
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import faint
import os
import py_ext_tests
class TestPng(unittest.TestCase):
def test_write_png(self):
out_dir = py_ext_tests.make_test_dir(self)
b1 = faint.Bitmap((5,7))
b1.set_pixel((0,0),(255,0... |
e9170de0c8d427e2545469c2d3add43bfae1cc54 | tests/test_construct_policy.py | tests/test_construct_policy.py | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | Add TODO for more IAM Policy testing | chore: Add TODO for more IAM Policy testing
See also: PSOBAT-1482
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | <commit_before>"""Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
... | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | """Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
],
... | <commit_before>"""Test IAM Policies for correctness."""
import json
from foremast.iam.construct_policy import construct_policy
ANSWER1 = {
'Version': '2012-10-17',
'Statement': [
{
'Effect': 'Allow',
'Action': [
's3:GetObject',
's3:ListObject'
... |
e95bcb1a2688a9b5a0c09728cdd0082b643de943 | pcbot/config.py | pcbot/config.py | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | Check if data is not None instead of if data is true | Check if data is not None instead of if data is true
| Python | mit | pckv/pcbot,PcBoy111/PC-BOT-V2,PcBoy111/PCBOT | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | <commit_before>import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_p... | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_path)
l... | <commit_before>import json
from os.path import exists
from os import mkdir
class Config:
config_path = "config/"
def __init__(self, filename, data=None, load=True):
self.filepath = "{}{}.json".format(self.config_path, filename)
if not exists(self.config_path):
mkdir(self.config_p... |
0e513331fd649ac71c2d9690c1cb72bf5954973c | __init__.py | __init__.py | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if V... | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 1, 0, 'alpha', 1, False)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if ... | Bump to Review Board 1.1alpha1.dev. | Bump to Review Board 1.1alpha1.dev.
| Python | mit | 1tush/reviewboard,1tush/reviewboard,Khan/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,davidt/reviewboard,Khan/reviewboard,custode/reviewboard,sgallagher/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,chazy/reviewboard,KnowNo/reviewboard,chipx86/reviewboard,beol/reviewboard,atagar/ReviewBoard,1tush/rev... | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if V... | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 1, 0, 'alpha', 1, False)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if ... | <commit_before># The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSI... | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 1, 0, 'alpha', 1, False)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if ... | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]
if V... | <commit_before># The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSI... |
3f62c7b413f3ef6b1072437bcd1f08b1a9c6b6ea | armstrong/core/arm_layout/utils.py | armstrong/core/arm_layout/utils.py | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
template_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',
defaults='armstrong.core.arm_layout.utils.get_layout_template_name')\
.get_backend... | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
def get_layout_template_name(model, name):
ret = []
for a in model.__class__.mro():
if not hasattr(a, "_meta"):
continue
ret.append... | Revert backend template finder code | Revert backend template finder code
| Python | apache-2.0 | armstrong/armstrong.core.arm_layout,armstrong/armstrong.core.arm_layout | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
template_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',
defaults='armstrong.core.arm_layout.utils.get_layout_template_name')\
.get_backend... | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
def get_layout_template_name(model, name):
ret = []
for a in model.__class__.mro():
if not hasattr(a, "_meta"):
continue
ret.append... | <commit_before>from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
template_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',
defaults='armstrong.core.arm_layout.utils.get_layout_template_name')\
... | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
def get_layout_template_name(model, name):
ret = []
for a in model.__class__.mro():
if not hasattr(a, "_meta"):
continue
ret.append... | from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
template_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',
defaults='armstrong.core.arm_layout.utils.get_layout_template_name')\
.get_backend... | <commit_before>from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from armstrong.utils.backends import GenericBackend
template_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',
defaults='armstrong.core.arm_layout.utils.get_layout_template_name')\
... |
4503e6671828497189736c86d408f6c0a8b47058 | lambda_tweet.py | lambda_tweet.py | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | Update key name for S3 | Update key name for S3
| Python | mit | onema/lambda-tweet | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | <commit_before>import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secr... | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secrets']))
sec... | <commit_before>import boto3
import tweepy
import json
import base64
from tweet_s3_images import TweetS3Images
with open('./config.json', 'r') as file:
config = json.loads(file.read())
# Decrypt API keys
client = boto3.client('kms')
response = client.decrypt(CiphertextBlob=base64.b64decode(config['secr... |
8f099581930d0f55454751d8fbba05a3685c6144 | mbuild/tests/test_xyz.py | mbuild/tests/test_xyz.py | import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
| import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
ethane.save(filename='ethane.pdb')
ethane_in = mb.load('ethane.xyz', top='ethane.pdb')
assert ... | Add sanity checks to tests | Add sanity checks to tests
This should be cleaned up with an XYZ read that does not require reading in an
extra file (mdtraj requires a file with topological information, in this case
PDB file).
| Python | mit | iModels/mbuild,iModels/mbuild | import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
Add sanity checks to tests
This should be cleaned up with an XYZ read that does not require reading in an
extra file ... | import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
ethane.save(filename='ethane.pdb')
ethane_in = mb.load('ethane.xyz', top='ethane.pdb')
assert ... | <commit_before>import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
<commit_msg>Add sanity checks to tests
This should be cleaned up with an XYZ read that does not requir... | import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
ethane.save(filename='ethane.pdb')
ethane_in = mb.load('ethane.xyz', top='ethane.pdb')
assert ... | import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
Add sanity checks to tests
This should be cleaned up with an XYZ read that does not require reading in an
extra file ... | <commit_before>import numpy as np
import pytest
import mbuild as mb
from mbuild.tests.base_test import BaseTest
class TestXYZ(BaseTest):
def test_save(self, ethane):
ethane.save(filename='ethane.xyz')
<commit_msg>Add sanity checks to tests
This should be cleaned up with an XYZ read that does not requir... |
7d20874c43637f1236442333f60a88ec653f53f2 | resources/launchers/alfanousDesktop.py | resources/launchers/alfanousDesktop.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| Add resource paths to python launcher script (proxy) | Add resource paths to python launcher script (proxy)
| Python | agpl-3.0 | keelhaule/alfanous,muslih/alfanous,saifmahamood/alfanous,saifmahamood/alfanous,muslih/alfanous,muslih/alfanous,keelhaule/alfanous,saifmahamood/alfanous,saifmahamood/alfanous,keelhaule/alfanous,saifmahamood/alfanous,abougouffa/alfanous,keelhaule/alfanous,muslih/alfanous,muslih/alfanous,abougouffa/alfanous,keelhaule/alfa... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
Add resource paths to python launcher script (proxy) | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
<commit_msg>Add resource paths to python launcher script (proxy)<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
Add resource paths to python launcher script (proxy)#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
<commit_msg>Add resource paths to python launcher script (proxy)<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
... |
7537387aa80109877d6659cc54ec0ee7aa6496bd | robot/Cumulus/resources/locators_50.py | robot/Cumulus/resources/locators_50.py | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | Revert "changes in locator_50 file (current and old versions)" | Revert "changes in locator_50 file (current and old versions)"
This reverts commit 819dfa4ed2033c1f82973edb09215b96d3c4b188.
| Python | bsd-3-clause | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | <commit_before>from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['fiel... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | <commit_before>from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['fiel... |
c72b727d373ac620379fe0a2a0c1b85bb868962e | test_arrange_schedule.py | test_arrange_schedule.py | from arrange_schedule import *
def test_crawler_cwb_img(system_setting):
send_msg = {}
send_msg['server_dir'] = system_setting['board_py_dir']
send_msg['user_id'] = 1
receive_msg = crawler_cwb_img(send_msg)
assert receive_msg['result'] == 'success'
if __name__ == "__main__":
system_setting =... | from arrange_schedule import *
def test_read_system_setting():
keys = ['board_py_dir','shutdown','max_db_log','min_db_activity']
system_setting = read_system_setting()
for key in keys:
assert key in system_setting
return system_setting
def test_crawler_cwb_img(system_setting):
send_msg = ... | Add test case for read_system_setting() | Add test case for read_system_setting()
| Python | apache-2.0 | stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,chenyang14/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,stvreumi/electronic-blackboard,Billy419... | from arrange_schedule import *
def test_crawler_cwb_img(system_setting):
send_msg = {}
send_msg['server_dir'] = system_setting['board_py_dir']
send_msg['user_id'] = 1
receive_msg = crawler_cwb_img(send_msg)
assert receive_msg['result'] == 'success'
if __name__ == "__main__":
system_setting =... | from arrange_schedule import *
def test_read_system_setting():
keys = ['board_py_dir','shutdown','max_db_log','min_db_activity']
system_setting = read_system_setting()
for key in keys:
assert key in system_setting
return system_setting
def test_crawler_cwb_img(system_setting):
send_msg = ... | <commit_before>from arrange_schedule import *
def test_crawler_cwb_img(system_setting):
send_msg = {}
send_msg['server_dir'] = system_setting['board_py_dir']
send_msg['user_id'] = 1
receive_msg = crawler_cwb_img(send_msg)
assert receive_msg['result'] == 'success'
if __name__ == "__main__":
s... | from arrange_schedule import *
def test_read_system_setting():
keys = ['board_py_dir','shutdown','max_db_log','min_db_activity']
system_setting = read_system_setting()
for key in keys:
assert key in system_setting
return system_setting
def test_crawler_cwb_img(system_setting):
send_msg = ... | from arrange_schedule import *
def test_crawler_cwb_img(system_setting):
send_msg = {}
send_msg['server_dir'] = system_setting['board_py_dir']
send_msg['user_id'] = 1
receive_msg = crawler_cwb_img(send_msg)
assert receive_msg['result'] == 'success'
if __name__ == "__main__":
system_setting =... | <commit_before>from arrange_schedule import *
def test_crawler_cwb_img(system_setting):
send_msg = {}
send_msg['server_dir'] = system_setting['board_py_dir']
send_msg['user_id'] = 1
receive_msg = crawler_cwb_img(send_msg)
assert receive_msg['result'] == 'success'
if __name__ == "__main__":
s... |
01a4a92f69219e081171aa1ad9c0215efec8f69d | flicks/settings/__init__.py | flicks/settings/__init__.py | from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
| from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
"""
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
"""
| Remove test settings to see if it fixes jenkins. | Remove test settings to see if it fixes jenkins. | Python | bsd-3-clause | mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks | from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
Remove test s... | from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
"""
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
"""
| <commit_before>from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pas... | from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
"""
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
"""
| from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pass
Remove test s... | <commit_before>from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)'
% exc.args[0]])
raise exc
import sys
if sys.argv[1] == 'test':
try:
from .test import *
except ImportError:
pas... |
854ad9b06ab5da3c4ac0ae308d4d8d01a0739d42 | openliveq/click_model.py | openliveq/click_model.py | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | Use topk in the click model | Use topk in the click model
| Python | mit | mpkato/openliveq | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | <commit_before>from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simp... | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simple model, the e... | <commit_before>from math import exp
class ClickModel(object):
'''
Simple Position-biased Model:
P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),
where
C_r is click on the r-th document,
A_r is being attracted by the r-th document, and
E_r is examination of the r-th document.
In this simp... |
343baa4b8a0ed9d4db0727c514d9ff97b937c7ee | adLDAP.py | adLDAP.py | import ldap
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldapUsername = username + '@' + domain
ldapPassword = password
b... | import ldap
validEditAccessGroups = ['Office Assistants', 'Domain Admins']
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldap... | Add group fetching from AD | Add group fetching from AD
| Python | mit | lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory | import ldap
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldapUsername = username + '@' + domain
ldapPassword = password
b... | import ldap
validEditAccessGroups = ['Office Assistants', 'Domain Admins']
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldap... | <commit_before>import ldap
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldapUsername = username + '@' + domain
ldapPassword ... | import ldap
validEditAccessGroups = ['Office Assistants', 'Domain Admins']
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldap... | import ldap
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldapUsername = username + '@' + domain
ldapPassword = password
b... | <commit_before>import ldap
def checkCredentials(username, password):
if password == "":
return 'Empty Password'
controller = 'devdc'
domainA = 'dev'
domainB = 'devlcdi'
domain = domainA + '.' + domainB
ldapServer = 'ldap://' + controller + '.' + domain
ldapUsername = username + '@' + domain
ldapPassword ... |
92108cdac6e9324ba9584359b6502e87ce7dcccb | owebunit/tests/simple.py | owebunit/tests/simple.py | import BaseHTTPServer
import threading
import time
import owebunit
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.wfile.write("HTTP/1.0 200 OK\n")
self.wfile.write("Content-Type: text/plain\n")
self.wfile.write("\n")
self.wfile.write("Response text")
d... | import BaseHTTPServer
import threading
import time
import owebunit
import bottle
app = bottle.Bottle()
@app.route('/ok')
def ok():
return 'ok'
@app.route('/internal_server_error')
def internal_error():
bottle.abort(500, 'internal server error')
def run_server():
app.run(host='localhost', port=8041)
cla... | Switch to using bottle in test suite | Switch to using bottle in test suite
| Python | bsd-2-clause | p/webracer | import BaseHTTPServer
import threading
import time
import owebunit
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.wfile.write("HTTP/1.0 200 OK\n")
self.wfile.write("Content-Type: text/plain\n")
self.wfile.write("\n")
self.wfile.write("Response text")
d... | import BaseHTTPServer
import threading
import time
import owebunit
import bottle
app = bottle.Bottle()
@app.route('/ok')
def ok():
return 'ok'
@app.route('/internal_server_error')
def internal_error():
bottle.abort(500, 'internal server error')
def run_server():
app.run(host='localhost', port=8041)
cla... | <commit_before>import BaseHTTPServer
import threading
import time
import owebunit
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.wfile.write("HTTP/1.0 200 OK\n")
self.wfile.write("Content-Type: text/plain\n")
self.wfile.write("\n")
self.wfile.write("Res... | import BaseHTTPServer
import threading
import time
import owebunit
import bottle
app = bottle.Bottle()
@app.route('/ok')
def ok():
return 'ok'
@app.route('/internal_server_error')
def internal_error():
bottle.abort(500, 'internal server error')
def run_server():
app.run(host='localhost', port=8041)
cla... | import BaseHTTPServer
import threading
import time
import owebunit
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.wfile.write("HTTP/1.0 200 OK\n")
self.wfile.write("Content-Type: text/plain\n")
self.wfile.write("\n")
self.wfile.write("Response text")
d... | <commit_before>import BaseHTTPServer
import threading
import time
import owebunit
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.wfile.write("HTTP/1.0 200 OK\n")
self.wfile.write("Content-Type: text/plain\n")
self.wfile.write("\n")
self.wfile.write("Res... |
2747b9a5fb480176df2a8910156c9e56dd9fcd1a | src/commit_id.py | src/commit_id.py | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('git', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | Fix typo in Python commit id script. | Fix typo in Python commit id script.
BUG=angle:529
Change-Id: Ife174e3fb4cb32342f519691d1d5d5c015cf2727
Reviewed-on: https://chromium-review.googlesource.com/187541
Reviewed-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@chromium.org>
Reviewed-by: Shannon Woods <0f3694938fd5703bd548127ee497e4d604509bef@... | Python | bsd-3-clause | geekboxzone/lollipop_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,xin3liang/platform_external_chromium_org_third_party_angle,geekboxzone/lollip... | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('git', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | <commit_before>import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--form... | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('git', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD'... | <commit_before>import subprocess as sp
import sys
def grab_output(*command):
return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()
commit_id_size = 12
try:
commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD')
commit_date = grab_output('git', 'show', '-s', '--form... |
f90cc1b24910b1c6214bdda3c2de831b5b507e01 | factual/common/responses.py | factual/common/responses.py | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | Fix parsing of errors returned by API. | Fix parsing of errors returned by API.
| Python | bsd-2-clause | casebeer/factual | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | <commit_before>import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self... | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self.status == "err... | <commit_before>import logging
import exceptions
class Response(object):
def __init__(self, body, meta=None):
self.meta = meta
self.body = body
# todo: handle non-"ok" status
self.status = body.get("status", None)
self.version = body.get("version", None)
self.response = body.get("response", {})
if self... |
6daa0f1aa06092598892cb37a7f3c5f3541fa0c2 | cms/manage.py | cms/manage.py | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t... | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. "
"It app... | Fix string layout for readability | Fix string layout for readability
| Python | agpl-3.0 | prarthitm/edxplatform,nanolearningllc/edx-platform-cypress,benpatterson/edx-platform,mjirayu/sit_academy,yokose-ks/edx-platform,Edraak/edx-platform,10clouds/edx-platform,raccoongang/edx-platform,kursitet/edx-platform,jolyonb/edx-platform,cecep-edu/edx-platform,Edraak/circleci-edx-platform,nttks/edx-platform,ampax/edx-p... | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t... | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. "
"It app... | <commit_before>#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you'... | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. "
"It app... | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t... | <commit_before>#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you'... |
7217e2dcbec3e13d730e47e001d00c5fb8534468 | moa/__init__.py | moa/__init__.py | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
from moa.logger import Logger
#: moa configuration filename
moa_config_fn = ''
if not environ.get('MOA_DOC_INCLUDE'):
moa_config_... | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
if 'MOA_CLOCK' in environ:
from moa.clock import set_clock
set_clock(clock='moa')
from moa.logger import Logger
#: moa confi... | Add config option to start moa clock. | Add config option to start moa clock.
| Python | mit | matham/moa | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
from moa.logger import Logger
#: moa configuration filename
moa_config_fn = ''
if not environ.get('MOA_DOC_INCLUDE'):
moa_config_... | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
if 'MOA_CLOCK' in environ:
from moa.clock import set_clock
set_clock(clock='moa')
from moa.logger import Logger
#: moa confi... | <commit_before>'''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
from moa.logger import Logger
#: moa configuration filename
moa_config_fn = ''
if not environ.get('MOA_DOC_INCLUDE'):
... | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
if 'MOA_CLOCK' in environ:
from moa.clock import set_clock
set_clock(clock='moa')
from moa.logger import Logger
#: moa confi... | '''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
from moa.logger import Logger
#: moa configuration filename
moa_config_fn = ''
if not environ.get('MOA_DOC_INCLUDE'):
moa_config_... | <commit_before>'''A framework for designing and running experiments in Python using Kivy.
'''
__version__ = '0.1-dev'
from kivy import kivy_home_dir
from os import environ
from os.path import join
from moa.logger import Logger
#: moa configuration filename
moa_config_fn = ''
if not environ.get('MOA_DOC_INCLUDE'):
... |
8556fc0b6fb024ab6cc68364270462681209108a | examples/match.py | examples/match.py | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_summoner(name: str, id: int):
me = Summoner(name="Kalturi", id=21359666)
#matches = cass.get_matches(me)
matches = me.matches
match = matches[0]
print(match.id)
for p in match.participants:
print(p.id, p.champion... | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_newest_match(name: str, region: str):
summoner = Summoner(name=name, region=region)
# matches = cass.get_matches(summoner)
matches = summoner.matches
match = matches[0]
print('Match ID:', match.id)
for p in match.partici... | Add print description, use function arguments | Add print description, use function arguments
- changed name and ID to being name and region
- Add a string to the print calls denoting what's being printed out
| Python | mit | robrua/cassiopeia,10se1ucgo/cassiopeia,meraki-analytics/cassiopeia | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_summoner(name: str, id: int):
me = Summoner(name="Kalturi", id=21359666)
#matches = cass.get_matches(me)
matches = me.matches
match = matches[0]
print(match.id)
for p in match.participants:
print(p.id, p.champion... | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_newest_match(name: str, region: str):
summoner = Summoner(name=name, region=region)
# matches = cass.get_matches(summoner)
matches = summoner.matches
match = matches[0]
print('Match ID:', match.id)
for p in match.partici... | <commit_before>import cassiopeia as cass
from cassiopeia.core import Summoner
def print_summoner(name: str, id: int):
me = Summoner(name="Kalturi", id=21359666)
#matches = cass.get_matches(me)
matches = me.matches
match = matches[0]
print(match.id)
for p in match.participants:
print(p... | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_newest_match(name: str, region: str):
summoner = Summoner(name=name, region=region)
# matches = cass.get_matches(summoner)
matches = summoner.matches
match = matches[0]
print('Match ID:', match.id)
for p in match.partici... | import cassiopeia as cass
from cassiopeia.core import Summoner
def print_summoner(name: str, id: int):
me = Summoner(name="Kalturi", id=21359666)
#matches = cass.get_matches(me)
matches = me.matches
match = matches[0]
print(match.id)
for p in match.participants:
print(p.id, p.champion... | <commit_before>import cassiopeia as cass
from cassiopeia.core import Summoner
def print_summoner(name: str, id: int):
me = Summoner(name="Kalturi", id=21359666)
#matches = cass.get_matches(me)
matches = me.matches
match = matches[0]
print(match.id)
for p in match.participants:
print(p... |
5e8d64bcbb53da0984ac0b41a470417a05c530d7 | microcosm_postgres/factories.py | microcosm_postgres/factories.py | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | Rename factory to match what it creates | Rename factory to match what it creates
| Python | apache-2.0 | globality-corp/microcosm-postgres,globality-corp/microcosm-postgres | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | <commit_before>"""
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_en... | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | """
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_engine(graph):
... | <commit_before>"""
Factory that configures SQLAlchemy for PostgreSQL.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from microcosm.api import binding, defaults
@binding("postgres")
@defaults(
host="localhost",
port=5432,
password="secret",
)
def configure_sqlalchemy_en... |
87d9365cd3f19a52957e2e26cefa9fa048c2acb1 | TWLight/resources/filters.py | TWLight/resources/filters.py | import django_filters
from .models import Language, Partner
from .helpers import get_tag_choices
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
label="Tags", choices=get_tag_choices(), method="tags_filter"
)
languages = django_filters.ModelChoiceFilter(queryset... | from django.utils.translation import gettext as _
from .models import Language, Partner
from .helpers import get_tag_choices
import django_filters
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
# Translators: On the MyLibrary page (https://wikipedialibrary.wmflabs.or... | Mark filter headers in My Library for translation | Mark filter headers in My Library for translation
| Python | mit | WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight | import django_filters
from .models import Language, Partner
from .helpers import get_tag_choices
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
label="Tags", choices=get_tag_choices(), method="tags_filter"
)
languages = django_filters.ModelChoiceFilter(queryset... | from django.utils.translation import gettext as _
from .models import Language, Partner
from .helpers import get_tag_choices
import django_filters
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
# Translators: On the MyLibrary page (https://wikipedialibrary.wmflabs.or... | <commit_before>import django_filters
from .models import Language, Partner
from .helpers import get_tag_choices
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
label="Tags", choices=get_tag_choices(), method="tags_filter"
)
languages = django_filters.ModelChoice... | from django.utils.translation import gettext as _
from .models import Language, Partner
from .helpers import get_tag_choices
import django_filters
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
# Translators: On the MyLibrary page (https://wikipedialibrary.wmflabs.or... | import django_filters
from .models import Language, Partner
from .helpers import get_tag_choices
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
label="Tags", choices=get_tag_choices(), method="tags_filter"
)
languages = django_filters.ModelChoiceFilter(queryset... | <commit_before>import django_filters
from .models import Language, Partner
from .helpers import get_tag_choices
class PartnerFilter(django_filters.FilterSet):
tags = django_filters.ChoiceFilter(
label="Tags", choices=get_tag_choices(), method="tags_filter"
)
languages = django_filters.ModelChoice... |
e563e8f8f1af691c4c9aa2f6177fbf2c8e2a4855 | della/user_manager/draw_service.py | della/user_manager/draw_service.py | import json
from django.conf import settings
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'status': True}, f)
return True
def _get_status_file():
file_path = settings.STA... | import json
import random
from collections import deque
from django.conf import settings
from django.contrib.auth.models import User
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'s... | Add helper funtions for making pairs | Add helper funtions for making pairs
| Python | mit | avinassh/della,avinassh/della,avinassh/della | import json
from django.conf import settings
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'status': True}, f)
return True
def _get_status_file():
file_path = settings.STA... | import json
import random
from collections import deque
from django.conf import settings
from django.contrib.auth.models import User
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'s... | <commit_before>import json
from django.conf import settings
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'status': True}, f)
return True
def _get_status_file():
file_path... | import json
import random
from collections import deque
from django.conf import settings
from django.contrib.auth.models import User
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'s... | import json
from django.conf import settings
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'status': True}, f)
return True
def _get_status_file():
file_path = settings.STA... | <commit_before>import json
from django.conf import settings
def _get_default_file_content():
return {'status': False}
def _write_status_file():
file_path = settings.STATUS_FILE
with open(file_path, 'w') as f:
json.dump({'status': True}, f)
return True
def _get_status_file():
file_path... |
21f06746eebe809f5d7017394b4c7c50ba319066 | street_score/bulkadmin/forms.py | street_score/bulkadmin/forms.py | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField()
def clean(self):
cleaned_data = super(BulkUploadForm, self).clean()
cleaned_data['data'] = BulkUploadForm.load_csv(cleaned_data['data'])
return cleaned_data
@staticmethod
def load... | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField(help_text="""
<p>Select the CSV file to upload. The file should have a header for
each column you want to populate. When you have selected your
file, click the 'Upload' button below.</p>
... | Add a help_text string to the admin form | Add a help_text string to the admin form
| Python | mit | openplans/streetscore,openplans/streetscore,openplans/streetscore | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField()
def clean(self):
cleaned_data = super(BulkUploadForm, self).clean()
cleaned_data['data'] = BulkUploadForm.load_csv(cleaned_data['data'])
return cleaned_data
@staticmethod
def load... | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField(help_text="""
<p>Select the CSV file to upload. The file should have a header for
each column you want to populate. When you have selected your
file, click the 'Upload' button below.</p>
... | <commit_before>import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField()
def clean(self):
cleaned_data = super(BulkUploadForm, self).clean()
cleaned_data['data'] = BulkUploadForm.load_csv(cleaned_data['data'])
return cleaned_data
@staticmeth... | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField(help_text="""
<p>Select the CSV file to upload. The file should have a header for
each column you want to populate. When you have selected your
file, click the 'Upload' button below.</p>
... | import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField()
def clean(self):
cleaned_data = super(BulkUploadForm, self).clean()
cleaned_data['data'] = BulkUploadForm.load_csv(cleaned_data['data'])
return cleaned_data
@staticmethod
def load... | <commit_before>import csv
from django import forms
class BulkUploadForm(forms.Form):
data = forms.FileField()
def clean(self):
cleaned_data = super(BulkUploadForm, self).clean()
cleaned_data['data'] = BulkUploadForm.load_csv(cleaned_data['data'])
return cleaned_data
@staticmeth... |
edadd7385ff8c839b524a6c06d0fc370c3db25bb | src/constants.py | src/constants.py | #!/usr/bin/env python
TRAJECTORY_TYPE = 'circular'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120
DELTA_T = 0.1 # this is the sampling time
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.90
| #!/usr/bin/env python
TRAJECTORY_TYPE = 'squared'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40.0
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120.0
elif TRAJECTORY_TYPE == 'squared':
SIMULATION_TIME_IN_SECONDS = 160.0
DELTA_T = 0.1 # this is the sampling time
STEPS =... | Add simulation time for a squared trajectory | Add simulation time for a squared trajectory
| Python | mit | bit0001/trajectory_tracking,bit0001/trajectory_tracking | #!/usr/bin/env python
TRAJECTORY_TYPE = 'circular'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120
DELTA_T = 0.1 # this is the sampling time
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.90
Add simulati... | #!/usr/bin/env python
TRAJECTORY_TYPE = 'squared'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40.0
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120.0
elif TRAJECTORY_TYPE == 'squared':
SIMULATION_TIME_IN_SECONDS = 160.0
DELTA_T = 0.1 # this is the sampling time
STEPS =... | <commit_before>#!/usr/bin/env python
TRAJECTORY_TYPE = 'circular'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120
DELTA_T = 0.1 # this is the sampling time
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.... | #!/usr/bin/env python
TRAJECTORY_TYPE = 'squared'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40.0
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120.0
elif TRAJECTORY_TYPE == 'squared':
SIMULATION_TIME_IN_SECONDS = 160.0
DELTA_T = 0.1 # this is the sampling time
STEPS =... | #!/usr/bin/env python
TRAJECTORY_TYPE = 'circular'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120
DELTA_T = 0.1 # this is the sampling time
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.90
Add simulati... | <commit_before>#!/usr/bin/env python
TRAJECTORY_TYPE = 'circular'
if TRAJECTORY_TYPE == 'linear':
SIMULATION_TIME_IN_SECONDS = 40
elif TRAJECTORY_TYPE == 'circular':
SIMULATION_TIME_IN_SECONDS = 120
DELTA_T = 0.1 # this is the sampling time
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.... |
d386c389b9e350b01fdf25f7cd91857d3fbb1ead | opps/contrib/multisite/admin.py | opps/contrib/multisite/admin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | Use OPPS_MULTISITE_ADMIN on queryset AdminViewPermission | Use OPPS_MULTISITE_ADMIN on queryset AdminViewPermission
| Python | mit | opps/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermissi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermission, self).query... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.conf import settings
from django.utils import timezone
from .models import SitePermission
class AdminViewPermission(admin.ModelAdmin):
def queryset(self, request):
queryset = super(AdminViewPermissi... |
52e6dabe13abdcd81a097beaacca585800397552 | examples/upperair/Wyoming_Request.py | examples/upperair/Wyoming_Request.py | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | Add attaching units to example. | Add attaching units to example.
| Python | bsd-3-clause | Unidata/siphon | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | <commit_before># Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyomi... | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | # Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyoming upper air ar... | <commit_before># Copyright (c) 2017 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Wyoming Upper Air Data Request
==============================
This example shows how to use siphon's `simplewebswervice` support to create a query to
the Wyomi... |
394ed06411d3ca3ada66aab3bee796682895acc0 | cla_backend/apps/core/testing.py | cla_backend/apps/core/testing.py | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | Install pgcrypto PGSQL extension but only if it does not exist already (e.g. from template1) | Install pgcrypto PGSQL extension but only if it does not exist already (e.g. from template1)
| Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | <commit_before>from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner ... | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner = 'django_jenki... | <commit_before>from django.core.management import call_command
from django.test.utils import get_runner
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
# use jenkins runner if present otherwise the default django one
if 'django_jenkins' in settings.INSTALLED_APPS:
base_runner ... |
9e2d3ed154e977d38126f610f11a0df3a0141da1 | apps/local_apps/account/context_processors.py | apps/local_apps/account/context_processors.py |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
account = AnonymousAccount(request)
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Acco... |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Account.DoesNotExist, Account.MultipleObject... | Handle the exception case in the account context_processor. | Handle the exception case in the account context_processor.
git-svn-id: 51ba99f60490c2ee9ba726ccda75a38950f5105d@1119 45601e1e-1555-4799-bd40-45c8c71eef50
| Python | mit | alex/pinax,amarandon/pinax,amarandon/pinax,amarandon/pinax,amarandon/pinax,alex/pinax,alex/pinax |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
account = AnonymousAccount(request)
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Acco... |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Account.DoesNotExist, Account.MultipleObject... | <commit_before>
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
account = AnonymousAccount(request)
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
... |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Account.DoesNotExist, Account.MultipleObject... |
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
account = AnonymousAccount(request)
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
except (Acco... | <commit_before>
from account.models import Account, AnonymousAccount
def openid(request):
return {'openid': request.openid}
def account(request):
account = AnonymousAccount(request)
if request.user.is_authenticated():
try:
account = Account._default_manager.get(user=request.user)
... |
dddb15a50d64a7b2660f2af1a407dd7fa9b3742b | samples/auth.py | samples/auth.py | """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
| """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery import build
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
| Make sure to import build from googleapiclient.discovery. | Make sure to import build from googleapiclient.discovery.
| Python | apache-2.0 | googlearchive/bigquery-samples-python,googlearchive/bigquery-samples-python | """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
Make sure to import build from googleapiclient.discovery. | """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery import build
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
| <commit_before>"""[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
<commit_msg>Make sure to import build from googleapicli... | """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery import build
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
| """[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
Make sure to import build from googleapiclient.discovery."""[START aut... | <commit_before>"""[START auth]"""
from oauth2client.client import GoogleCredentials
from googleapiclient.discovery
def get_service():
credentials = GoogleCredentials.get_application_default()
return build('bigquery', 'v2', credentials)
"""[END auth]"""
<commit_msg>Make sure to import build from googleapicli... |
be7f3153e1505ecdfca6e5078c4b3a4ed1817c28 | setup.py | setup.py | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | Add description content type for pypi. | Add description content type for pypi.
| Python | mit | bradleyg/django-s3direct,bradleyg/django-s3direct,bradleyg/django-s3direct | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | <commit_before>import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package[... | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package['version'],
... | <commit_before>import os
import json
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
f = open(os.path.join(os.path.dirname(__file__), 'package.json'))
package = json.loads(f.read())
f.close()
setup(
name=package['name'],
version=package[... |
c99ef9e318467624de8f62afee6c14ca422e8413 | setup.py | setup.py | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | Include pip as required install | Include pip as required install
| Python | bsd-3-clause | sky-uk/bslint | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | <commit_before># -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read(... | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8... | <commit_before># -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import setup, find_packages
import pip
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('src/bslint.py').read(),
re.M
).group(1)
with open("README.rst", "rb") as f:
long_descr = f.read(... |
a3fb6a02a2c039fe53326ab7bf974efa1df0c2fe | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabilities... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabiliti... | Bump version to fix pypi packaging | Bump version to fix pypi packaging
| Python | mit | ihuro/rq-scheduler,sum12/rq-scheduler,cheungpat/rq-scheduler,ui/rq-scheduler,lechup/rq-scheduler,mbodock/rq-scheduler,peergradeio/rq-scheduler | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabilities... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabiliti... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduli... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabiliti... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduling capabilities... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='rq-scheduler',
version='0.1',
author='Selwin Ong',
author_email='selwin.ong@gmail.com',
packages=['rq_scheduler'],
url='https://github.com/ui/rq-scheduler',
license='MIT',
description='Provides job scheduli... |
cadc5534f5926a0aeb1fb4bf6e9f1db0f56a9b6f | setup.py | setup.py | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = req_file.read().split('\n')
with open('requirements-dev.txt') as req_file:
requires_dev = req_file.read().split('\n')
with open('VERSION')... | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = [req for req in req_file.read().split('\n') if req]
with open('requirements-dev.txt') as req_file:
requires_dev = [req for req in req_file.... | Remove empty string from requirements list | Remove empty string from requirements list
When we moved to Python 3 we used this simpler method to read the requirements
file. However we need to remove the empty/Falsey elements from the list.
This fixes the error:
```
Failed building wheel for molo.polls
```
| Python | bsd-2-clause | praekelt/molo.polls,praekelt/molo.polls | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = req_file.read().split('\n')
with open('requirements-dev.txt') as req_file:
requires_dev = req_file.read().split('\n')
with open('VERSION')... | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = [req for req in req_file.read().split('\n') if req]
with open('requirements-dev.txt') as req_file:
requires_dev = [req for req in req_file.... | <commit_before>from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = req_file.read().split('\n')
with open('requirements-dev.txt') as req_file:
requires_dev = req_file.read().split('\n')
with ... | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = [req for req in req_file.read().split('\n') if req]
with open('requirements-dev.txt') as req_file:
requires_dev = [req for req in req_file.... | from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = req_file.read().split('\n')
with open('requirements-dev.txt') as req_file:
requires_dev = req_file.read().split('\n')
with open('VERSION')... | <commit_before>from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('requirements.txt') as req_file:
requires = req_file.read().split('\n')
with open('requirements-dev.txt') as req_file:
requires_dev = req_file.read().split('\n')
with ... |
e197d1a030993ec01c113188593fbd12267fd4fa | setup.py | setup.py | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | Exclude tests package from distribution | Exclude tests package from distribution
| Python | bsd-3-clause | wgiddens/Willow,wgiddens/Willow | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | <commit_before>#!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.e... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | <commit_before>#!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.e... |
0a9601c4ee085c38f660e6d40c98256098576a92 | setup.py | setup.py | from distutils.core import setup
from pip.req import parse_requirements
install_reqs = parse_requirements("./requirements.txt")
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.0.1',
modules=['url_matchers'],
install_requires=reqs,
author="Alex Good",
author_e... | from distutils.core import setup
from os import path
from pip.req import parse_requirements
requirements_location = path.join(path.dirname(__file__), "requirements.txt")
install_reqs = parse_requirements(requirements_location)
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.... | Use absolute path for requirements file | Use absolute path for requirements file
| Python | mit | alexjg/url-matchers | from distutils.core import setup
from pip.req import parse_requirements
install_reqs = parse_requirements("./requirements.txt")
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.0.1',
modules=['url_matchers'],
install_requires=reqs,
author="Alex Good",
author_e... | from distutils.core import setup
from os import path
from pip.req import parse_requirements
requirements_location = path.join(path.dirname(__file__), "requirements.txt")
install_reqs = parse_requirements(requirements_location)
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.... | <commit_before>from distutils.core import setup
from pip.req import parse_requirements
install_reqs = parse_requirements("./requirements.txt")
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.0.1',
modules=['url_matchers'],
install_requires=reqs,
author="Alex Good... | from distutils.core import setup
from os import path
from pip.req import parse_requirements
requirements_location = path.join(path.dirname(__file__), "requirements.txt")
install_reqs = parse_requirements(requirements_location)
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.... | from distutils.core import setup
from pip.req import parse_requirements
install_reqs = parse_requirements("./requirements.txt")
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.0.1',
modules=['url_matchers'],
install_requires=reqs,
author="Alex Good",
author_e... | <commit_before>from distutils.core import setup
from pip.req import parse_requirements
install_reqs = parse_requirements("./requirements.txt")
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='url-matchers',
version='0.0.1',
modules=['url_matchers'],
install_requires=reqs,
author="Alex Good... |
091d0589d40e5bc19a58e16653ab48c9a821b276 | setup.py | setup.py | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | Add Python 3 only classifier | Add Python 3 only classifier
| Python | mit | veeti/manuale | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | <commit_before>from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully ma... | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully manual Let's Encr... | <commit_before>from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
name='manuale',
version='1.0.1.dev0',
license='MIT',
description="A fully ma... |
6cb1b973e24fee5879d5623673d976b66fdf4252 | setup.py | setup.py | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | Add nose to the requirements, why not? | Add nose to the requirements, why not?
| Python | mit | grampajoe/tattler | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | <commit_before>from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license... | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license='MIT',
py_... | <commit_before>from setuptools import setup
setup(
name='tattler',
author='Joe Friedl',
author_email='joe@joefriedl.net',
version='0.1',
description='A nose plugin that tattles on functions.',
keywords='nose plugin test testing mock',
url='https://github.com/grampajoe/tattler',
license... |
9a2318d4ddadb57b4096896407c7683d9804e04d | setup.py | setup.py | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.5.3',
description='Publish browser extensions to their stores.',
long_description=long_description,
aut... | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.1',
description='Publish browser extensions to their stores.',
long_description=long_description,
autho... | Reset version number for newly named pkg | Reset version number for newly named pkg
| Python | mit | melkamar/webstore-manager,melkamar/webstore-manager | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.5.3',
description='Publish browser extensions to their stores.',
long_description=long_description,
aut... | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.1',
description='Publish browser extensions to their stores.',
long_description=long_description,
autho... | <commit_before>from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.5.3',
description='Publish browser extensions to their stores.',
long_description=long_descr... | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.1',
description='Publish browser extensions to their stores.',
long_description=long_description,
autho... | from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.5.3',
description='Publish browser extensions to their stores.',
long_description=long_description,
aut... | <commit_before>from setuptools import setup, find_packages
long_description = """Publish browser extensions to their stores.
Currently only available for Google Chrome."""
setup(
name='webstoremgr',
version='0.5.3',
description='Publish browser extensions to their stores.',
long_description=long_descr... |
2b3c9eb3f849e564775f71714c21d490858bd8dc | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | Remove classifiers that get outdated | Remove classifiers that get outdated
| Python | mit | mcs07/ChemSpiPy | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
versio... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
version='1.0.5',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
if os.path.exists('README.rst'):
long_description = open('README.rst').read()
else:
long_description = '''A simple Python wrapper around the ChemSpider Web Services.'''
setup(
name='ChemSpiPy',
versio... |
834637f8860f6b2d99726f9f531d05884e375ea3 | setup.py | setup.py | #!/usr/bin/env python
import os
import re
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
README = open(rel('README.rst')).read()
INIT_PY = open(rel('flask_redis.py')).read()
VERSION = re.findall("__version__ ... | #!/usr/bin/env python
import os
import re
import sys
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
with open(rel('README.rst')) as handler:
README = handler.read()
with open(rel('flask_redis.py')) as han... | Fix install requirements due to Python versions. | Fix install requirements due to Python versions.
| Python | bsd-3-clause | playpauseandstop/Flask-And-Redis,playpauseandstop/Flask-And-Redis | #!/usr/bin/env python
import os
import re
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
README = open(rel('README.rst')).read()
INIT_PY = open(rel('flask_redis.py')).read()
VERSION = re.findall("__version__ ... | #!/usr/bin/env python
import os
import re
import sys
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
with open(rel('README.rst')) as handler:
README = handler.read()
with open(rel('flask_redis.py')) as han... | <commit_before>#!/usr/bin/env python
import os
import re
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
README = open(rel('README.rst')).read()
INIT_PY = open(rel('flask_redis.py')).read()
VERSION = re.findal... | #!/usr/bin/env python
import os
import re
import sys
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
with open(rel('README.rst')) as handler:
README = handler.read()
with open(rel('flask_redis.py')) as han... | #!/usr/bin/env python
import os
import re
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
README = open(rel('README.rst')).read()
INIT_PY = open(rel('flask_redis.py')).read()
VERSION = re.findall("__version__ ... | <commit_before>#!/usr/bin/env python
import os
import re
from distutils.core import setup
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))
README = open(rel('README.rst')).read()
INIT_PY = open(rel('flask_redis.py')).read()
VERSION = re.findal... |
cb1b0b6c6bb3fb2f982f775ee831abf20916c020 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | Add support for python 3.7 and 3.8 in package classifiers | Add support for python 3.7 and 3.8 in package classifiers
| Python | mit | josegonzalez/python-github-backup,josegonzalez/python-github-backup | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
author_emai... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from github_backup import __version__
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='github-backup',
version=__version__,
author='Jose Diaz-Gonzalez',
... |
169240f25757db371108af98163c81f7cc0e647b | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
version = '0.4.3'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | from setuptools import setup, find_packages
import sys, os
version = '0.4.4'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | Change dateutil to python-dateutil because some loser decided to rename it. (Thanks Leigh) | Change dateutil to python-dateutil because some loser decided to rename it. (Thanks Leigh)
git-svn-id: 7187af8a85e68091b56e148623cc345c4eafc588@188 d723f978-dc38-0410-87ed-da353333cdcc
| Python | mit | hugovk/twitter,adonoho/twitter,durden/frappy,jessamynsmith/twitter,tytek2012/twitter,Adai0808/twitter,sixohsix/twitter,miragshin/twitter | from setuptools import setup, find_packages
import sys, os
version = '0.4.3'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | from setuptools import setup, find_packages
import sys, os
version = '0.4.4'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | <commit_before>from setuptools import setup, find_packages
import sys, os
version = '0.4.3'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/p... | from setuptools import setup, find_packages
import sys, os
version = '0.4.4'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | from setuptools import setup, find_packages
import sys, os
version = '0.4.3'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=l... | <commit_before>from setuptools import setup, find_packages
import sys, os
version = '0.4.3'
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/p... |
d1a784ec841f4f0fbe8945bf7a5f81e7c3952b93 | plugin_handler.py | plugin_handler.py | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | Disable more plugins to make it work again. | Disable more plugins to make it work again.
Will fix venues parsing later.
Signed-off-by: Ville Valkonen <989b9f9979d21943697628c770235933300d59bc@gmail.com>
| Python | isc | weezel/BandEventNotifier | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | <commit_before># -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstrac... | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | # -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstract_venue import ... | <commit_before># -*- coding: utf-8 -*-
# Execute this file to see what plugins will be loaded.
# Implementation leans to Lex Toumbourou's example:
# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/
import os
import pkgutil
import sys
from typing import List
from venues.abstrac... |
6bb184afc3317ca28bcdf9f684de40f173a5a3e6 | setup.py | setup.py | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | Remove libraries not required for most use cases | Remove libraries not required for most use cases
| Python | apache-2.0 | PUNCH-Cyber/stoq | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | <commit_before>import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifyi... | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifying analysis.",
... | <commit_before>import os
from setuptools import setup
# Ensure that the ssdeep library is built, otherwise install will fail
os.environ['BUILD_LIB'] = '1'
setup(
name="stoq",
version="0.10.16",
author="Marcus LaFerrera",
author_email="marcus@punchcyber.com",
description="A framework for simplifyi... |
8c694c6ad022710a9b7de3b10650591278325267 | setup.py | setup.py | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | Add support for Python 3.7 and Django 2.2 | Add support for Python 3.7 and Django 2.2
| Python | bsd-3-clause | blancltd/django-latest-tweets | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | <commit_before>#!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='h... | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... | <commit_before>#!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.5',
description='Latest Tweets for Django',
long_description=readme,
url='h... |
e5dd1f4cbbc76842ac7a95e9fe878631460ee020 | setup.py | setup.py | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.1',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.2',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | Update requests to fix security issue | Update requests to fix security issue | Python | mit | egnyte/gitlabform,egnyte/gitlabform | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.1',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.2',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | <commit_before>from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.1',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_descripti... | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.2',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.1',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_description=convert_mark... | <commit_before>from setuptools import setup, find_packages
from pypandoc import convert
def convert_markdown_to_rst(file):
return convert(file, 'rst')
setup(name='gitlabform',
version='1.0.1',
description='Easy configuration as code tool for GitLab using config in plain YAML',
long_descripti... |
b36f2518666572ccd3b98dd88536533e17a39e3f | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | Remove oauth_provider as that's the eggname for django-oauth-plus. | Remove oauth_provider as that's the eggname for django-oauth-plus.
| Python | apache-2.0 | uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.2... | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.211',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='SpaceScout-Server',
version='1.0',
description='REST Backend for SpaceScout',
install_requires=[
'Django>=1.7,<1.8',
'mock<=1.0.1',
'oauth2<=1.5.2... |
993b8b23d70b133528a52bc91292735bb5668abe | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | Rename commentthreadwriter to commentthreadworker since it does not write anything... | Rename commentthreadwriter to commentthreadworker since it does not write
anything...
| Python | bsd-3-clause | ZeitOnline/zeit.care | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | <commit_before>from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
packa... | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
package_dir = {'': '... | <commit_before>from setuptools import setup, find_packages
setup(
name='zeit.care',
version='0.2dev',
author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',
author_email='cz@gocept.com',
url='http://trac.gocept.com/zeit',
description="""\
""",
packages=find_packages('src'),
packa... |
e30a87841eb00d496d1980b025e2b2458eeaa101 | setup.py | setup.py | from setuptools import setup, Extension
import numpy
setup (name = 'xfel', \
version = '1.0', \
packages = ['xfel',
'xfel.core',
'xfel.orientaton',
'xfel.sampling',
'xfel.test',
],
package_dir = {'xfel... | from setuptools import setup, Extension
import numpy
setup (name = 'bxfel', \
version = '1.0', \
packages = ['bxfel',
'bxfel.core',
'bxfel.orientation',
'bxfel.sampling',
'bxfel.test',
],
package_dir =... | Include data files in pacakge | Include data files in pacakge
| Python | mit | mmechelke/bayesian_xfel,mmechelke/bayesian_xfel | from setuptools import setup, Extension
import numpy
setup (name = 'xfel', \
version = '1.0', \
packages = ['xfel',
'xfel.core',
'xfel.orientaton',
'xfel.sampling',
'xfel.test',
],
package_dir = {'xfel... | from setuptools import setup, Extension
import numpy
setup (name = 'bxfel', \
version = '1.0', \
packages = ['bxfel',
'bxfel.core',
'bxfel.orientation',
'bxfel.sampling',
'bxfel.test',
],
package_dir =... | <commit_before>from setuptools import setup, Extension
import numpy
setup (name = 'xfel', \
version = '1.0', \
packages = ['xfel',
'xfel.core',
'xfel.orientaton',
'xfel.sampling',
'xfel.test',
],
packa... | from setuptools import setup, Extension
import numpy
setup (name = 'bxfel', \
version = '1.0', \
packages = ['bxfel',
'bxfel.core',
'bxfel.orientation',
'bxfel.sampling',
'bxfel.test',
],
package_dir =... | from setuptools import setup, Extension
import numpy
setup (name = 'xfel', \
version = '1.0', \
packages = ['xfel',
'xfel.core',
'xfel.orientaton',
'xfel.sampling',
'xfel.test',
],
package_dir = {'xfel... | <commit_before>from setuptools import setup, Extension
import numpy
setup (name = 'xfel', \
version = '1.0', \
packages = ['xfel',
'xfel.core',
'xfel.orientaton',
'xfel.sampling',
'xfel.test',
],
packa... |
11a1ce43d2246574c5b4090252cb6464385194f4 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | Use an older raven until our Sentry is upgraded to 5.1 | Use an older raven until our Sentry is upgraded to 5.1
| Python | bsd-3-clause | praekelt/jmbo-skeleton,praekelt/jmbo-skeleton,praekelt/jmbo-skeleton | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | <commit_before>from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', ... | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
... | <commit_before>from setuptools import setup, find_packages
setup(
name='jmbo-skeleton',
version='0.6',
description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', ... |
38ccfb87ba7f6f139dbb99ba5002a8abec8c40be | setup.py | setup.py | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | Add PyPI classifiers for Python 3.4, 3.5 and 3.6 | Add PyPI classifiers for Python 3.4, 3.5 and 3.6
Since the tests pass on Python 3.
| Python | bsd-3-clause | jacobian/wsgi-sslify | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | <commit_before>from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
... | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
install_require... | <commit_before>from setuptools import setup
setup(
name = "wsgi-sslify",
description = "WSGI middleware to force HTTPS.",
version = "1.0.1",
author = "Jacob Kaplan-Moss",
author_email = "jacob@jacobian.org",
url = "https://github.com/jacobian/wsgi-sslify",
py_modules = ['wsgi_sslify'],
... |
8d5e1aaf0a06eeeacafcf62a58f83a4c23fc59b7 | comet/handler/test/test_spawn.py | comet/handler/test/test_spawn.py | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | Convert read data to unicode. | Convert read data to unicode.
The NamedTemporaryFile is in binary mode by default, so the read returns raw
bytes.
| Python | bsd-2-clause | jdswinbank/Comet,jdswinbank/Comet | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | <commit_before>import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnC... | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnCommandProtocolT... | <commit_before>import os
import sys
import tempfile
from twisted.trial import unittest
from twisted.python import util
from comet.icomet import IHandler
from comet.handler import SpawnCommand
SHELL = '/bin/sh'
class DummyEvent(object):
def __init__(self, text=None):
self.text = text or u""
class SpawnC... |
0261c895cb41f5caba42ae432b997fd3c941e96f | tests.py | tests.py | import pytest
import cleaner
class TestTagRemoval():
def test_span_removal(self):
text = ('<span style="font-family: "helvetica neue" ,'
'"arial" , "helvetica" , sans-serif;">This is some'
' dummy text lalalala</span> This is some more dummy text '
'<sp... | import pytest
import cleaner
class TestTagTools():
def test_get_pure_tag(self):
tag1 = '<div>'
tag2 = '</div>'
tag3 = '<pre class="prettyprint">'
assert cleaner.get_pure_tag(tag1) == '<div>'
assert cleaner.get_pure_tag(tag2) == '</div>'
assert cleaner.get_pure_tag(t... | Add test for getting pure html tag | Add test for getting pure html tag
| Python | mit | jamalmoir/blogger_html_cleaner | import pytest
import cleaner
class TestTagRemoval():
def test_span_removal(self):
text = ('<span style="font-family: "helvetica neue" ,'
'"arial" , "helvetica" , sans-serif;">This is some'
' dummy text lalalala</span> This is some more dummy text '
'<sp... | import pytest
import cleaner
class TestTagTools():
def test_get_pure_tag(self):
tag1 = '<div>'
tag2 = '</div>'
tag3 = '<pre class="prettyprint">'
assert cleaner.get_pure_tag(tag1) == '<div>'
assert cleaner.get_pure_tag(tag2) == '</div>'
assert cleaner.get_pure_tag(t... | <commit_before>import pytest
import cleaner
class TestTagRemoval():
def test_span_removal(self):
text = ('<span style="font-family: "helvetica neue" ,'
'"arial" , "helvetica" , sans-serif;">This is some'
' dummy text lalalala</span> This is some more dummy text... | import pytest
import cleaner
class TestTagTools():
def test_get_pure_tag(self):
tag1 = '<div>'
tag2 = '</div>'
tag3 = '<pre class="prettyprint">'
assert cleaner.get_pure_tag(tag1) == '<div>'
assert cleaner.get_pure_tag(tag2) == '</div>'
assert cleaner.get_pure_tag(t... | import pytest
import cleaner
class TestTagRemoval():
def test_span_removal(self):
text = ('<span style="font-family: "helvetica neue" ,'
'"arial" , "helvetica" , sans-serif;">This is some'
' dummy text lalalala</span> This is some more dummy text '
'<sp... | <commit_before>import pytest
import cleaner
class TestTagRemoval():
def test_span_removal(self):
text = ('<span style="font-family: "helvetica neue" ,'
'"arial" , "helvetica" , sans-serif;">This is some'
' dummy text lalalala</span> This is some more dummy text... |
d5de8224a0d67b74444a0ad7c755e3c7bc1c39a5 | features.py | features.py | """
Define all features to be extracted from the data
"""
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return list of feature values
... | """
Define all features to be extracted from the data
"""
import numpy as np
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return lis... | Use histogram of local binary patterns | Use histogram of local binary patterns
| Python | mit | kpj/PyClass | """
Define all features to be extracted from the data
"""
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return list of feature values
... | """
Define all features to be extracted from the data
"""
import numpy as np
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return lis... | <commit_before>"""
Define all features to be extracted from the data
"""
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return list of ... | """
Define all features to be extracted from the data
"""
import numpy as np
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return lis... | """
Define all features to be extracted from the data
"""
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return list of feature values
... | <commit_before>"""
Define all features to be extracted from the data
"""
from PIL import Image
from PIL.ImageStat import Stat
from skimage.feature import local_binary_pattern
class BaseFeatureExtractor(object):
""" Basis for all feature extractors
"""
def extract(self, data):
""" Return list of ... |
a20ffb81801a5f96af47ccf4bf7fe0133e74102b | source/views.py | source/views.py | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id = enum[1]
i18... | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
fields = ('i18n', )
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id =... | Add possibility to set fields | Add possibility to set fields | Python | mit | iktw/django-rest-enum-view | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id = enum[1]
i18... | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
fields = ('i18n', )
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id =... | <commit_before>from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id = enum[1]
... | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
fields = ('i18n', )
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id =... | from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id = enum[1]
i18... | <commit_before>from rest_framework.views import APIView
from rest_framework.response import Response
class EnumView(APIView):
permission_classes = []
def get(self, *args, **kwargs):
enums = self.enum_class.get_as_tuple_list()
context = []
for enum in enums:
_id = enum[1]
... |
2314829d58b200570272332c89a85b4009a396bf | tests/common.py | tests/common.py | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
if 'USE_SHOTGUN' in os.environ:
from shotgun_api3 import ShotgunError, Fault
import shotgun_api3_registry
def Shotgun():
return shotgun_api3_registry.connect('sgsession.tests', serve... | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
_shotgun_server = os.environ.get('SHOTGUN', 'mock')
if _shotgun_server == 'mock':
from sgmock import Shotgun, ShotgunError, Fault
else:
from shotgun_api3 import ShotgunError, Fault
import sh... | Change detection of Shotgun server for tests | Change detection of Shotgun server for tests | Python | bsd-3-clause | westernx/sgsession | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
if 'USE_SHOTGUN' in os.environ:
from shotgun_api3 import ShotgunError, Fault
import shotgun_api3_registry
def Shotgun():
return shotgun_api3_registry.connect('sgsession.tests', serve... | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
_shotgun_server = os.environ.get('SHOTGUN', 'mock')
if _shotgun_server == 'mock':
from sgmock import Shotgun, ShotgunError, Fault
else:
from shotgun_api3 import ShotgunError, Fault
import sh... | <commit_before>from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
if 'USE_SHOTGUN' in os.environ:
from shotgun_api3 import ShotgunError, Fault
import shotgun_api3_registry
def Shotgun():
return shotgun_api3_registry.connect('sgsessio... | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
_shotgun_server = os.environ.get('SHOTGUN', 'mock')
if _shotgun_server == 'mock':
from sgmock import Shotgun, ShotgunError, Fault
else:
from shotgun_api3 import ShotgunError, Fault
import sh... | from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
if 'USE_SHOTGUN' in os.environ:
from shotgun_api3 import ShotgunError, Fault
import shotgun_api3_registry
def Shotgun():
return shotgun_api3_registry.connect('sgsession.tests', serve... | <commit_before>from pprint import pprint, pformat
import datetime
import os
from sgmock import Fixture
from sgmock import TestCase
if 'USE_SHOTGUN' in os.environ:
from shotgun_api3 import ShotgunError, Fault
import shotgun_api3_registry
def Shotgun():
return shotgun_api3_registry.connect('sgsessio... |
cb966e6623306ce4dfd96a5a286482489e28b9e9 | pyclient/lockd.py | pyclient/lockd.py | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | Fix bug in python client | Fix bug in python client
| Python | mit | divtxt/lockd,divtxt/lockd | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | <commit_before># lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lock... | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | # lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lockish("POST", nam... | <commit_before># lockd client
import httplib
import json
class LockdClient(object):
def __init__(self, host="127.0.0.1", port=2080):
self._host_port = "%s:%s" % (host, port)
def is_locked(self, name):
return self._lockish("GET", name, 404)
def lock(self, name):
return self._lock... |
c6e69e1cec4de30a2e56ec865c3043edc7bf39b5 | civictechprojects/apps.py | civictechprojects/apps.py | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.remo... | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
# def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.re... | Comment out entire function to stop unexpected EOF effor | Comment out entire function to stop unexpected EOF effor
| Python | mit | DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.remo... | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
# def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.re... | <commit_before>from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
... | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
# def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.re... | from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
# Project.remo... | <commit_before>from django.apps import AppConfig
class CivictechprojectsConfig(AppConfig):
name = 'civictechprojects'
def ready(self):
# Remove any tags that aren't in the canonical tag list
# TODO: Fix so this doesn't break in production database
# from .models import Project
... |
fbf6fe6d6e5e3b9e9ea192eba7ef6b76b66ebf0a | trade_client.py | trade_client.py | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
print "Received: {}".format(response)
finall... | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
finally:
sock.close()
return response
... | Handle incoming messages that aren't JSON objects. | Handle incoming messages that aren't JSON objects.
| Python | mit | Tribler/decentral-market | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
print "Received: {}".format(response)
finall... | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
finally:
sock.close()
return response
... | <commit_before>import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
print "Received: {}".format(respo... | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
finally:
sock.close()
return response
... | import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
print "Received: {}".format(response)
finall... | <commit_before>import json
import socket
from orderbook import create_confirm
def send_msg(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)
response = sock.recv(1024)
print "Received: {}".format(respo... |
07de3a41daf1a82cb45e63472212821b9f6c809f | panoptes/state_machine/states/core.py | panoptes/state_machine/states/core.py | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | Add loop to sleep structur | Add loop to sleep structur
| Python | mit | joshwalawender/POCS,panoptes/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,panoptes/POCS,joshwalawender/POCS | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... |
a8179d06885d72e49335263ef2633f3128a20ee7 | tests/logging.py | tests/logging.py | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | Read test logs in bytes mode | Read test logs in bytes mode
| Python | bsd-3-clause | CIRCL/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Rafiot/PyCIRCLean | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | <commit_before>import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
... | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
test_log.... | <commit_before>import os
from datetime import datetime
def save_logs(groomer, test_description):
divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
test_log_path = 'tests/test_logs/{}.log'.format(test_description)
with open(test_log_path, 'w+') as test_log:
test_log.write(divider.format('TEST LOG'))
... |
523df3d68af5c8fbd52e0f86a7201d9c39f50f54 | lib/writeFiles.py | lib/writeFiles.py | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
pr... | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
print ... | Fix errors when contents of a file contains UTF-8 chars. | Fix errors when contents of a file contains UTF-8 chars.
- Convert tabs to spaces.
- Use a more pythonic way to open (and write into) the file.
- Add UTF-8 encoding before writing the contents of the file.
| Python | mit | sheenobu/nix-home,sheenobu/nix-home | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
pr... | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
print ... | <commit_before>import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) =... | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
print ... | import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) == unicode:
pr... | <commit_before>import json
import sys
import os
f = open(sys.argv[1])
out = sys.argv[2]
data = json.load(f)
for key in data["files"]:
val = data["files"][key]
try:
os.makedirs(out + "/" + os.path.dirname(key))
except:
print "ignoring error"
if type(val) == str or type(val) =... |
da2376744ec5b1823ea75f3cefbb0de0ac000c1b | tests/secrets.py | tests/secrets.py | # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
| # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS']
TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET']
TWITTER_ACCESS ... | Read twitter tokens from .env | Read twitter tokens from .env
| Python | mit | nestauk/inet | # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
Read twitter tokens from .env | # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS']
TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET']
TWITTER_ACCESS ... | <commit_before># -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
<commit_msg>Read twitter tokens from .env<commit_after> | # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS']
TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET']
TWITTER_ACCESS ... | # -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
Read twitter tokens from .env# -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY... | <commit_before># -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
OPS_KEY = os.environ['OPS_KEY']
OPS_SECRET = os.environ['OPS_SECRET']
<commit_msg>Read twitter tokens from .env<commit_after># -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv, find_d... |
53be5c9c86d544567f8171baba58128b5ad0502a | tests/test_io.py | tests/test_io.py | import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file=sys.stderr)
print('out', file=sys.stdout)
print('derr', file=sys.stderr)
assert 'stdout' in output
assert 's... | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file... | Make the tests compatible with python2. | Make the tests compatible with python2.
| Python | mit | kalekundert/nonstdlib,KenKundert/nonstdlib,KenKundert/nonstdlib,kalekundert/nonstdlib | import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file=sys.stderr)
print('out', file=sys.stdout)
print('derr', file=sys.stderr)
assert 'stdout' in output
assert 's... | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file... | <commit_before>import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file=sys.stderr)
print('out', file=sys.stdout)
print('derr', file=sys.stderr)
assert 'stdout' in outpu... | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file... | import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file=sys.stderr)
print('out', file=sys.stdout)
print('derr', file=sys.stderr)
assert 'stdout' in output
assert 's... | <commit_before>import nonstdlib
def test_capture_output():
import sys
with nonstdlib.capture_output() as output:
print('std', end='', file=sys.stdout)
print('st', end='', file=sys.stderr)
print('out', file=sys.stdout)
print('derr', file=sys.stderr)
assert 'stdout' in outpu... |
8bf8101bc755628e66da95734d30fe24e5d9a121 | test/__init__.py | test/__init__.py | from kitten import db
class MockDatabaseMixin(object):
def setup_method(self, method):
db.Base.metadata.create_all(db.engine)
self.session = db.Session()
def teardown_method(self, method):
self.session.close()
db.Base.metadata.drop_all(db.engine)
| Add database helpers to test base | Add database helpers to test base
| Python | mit | thiderman/network-kitten | Add database helpers to test base | from kitten import db
class MockDatabaseMixin(object):
def setup_method(self, method):
db.Base.metadata.create_all(db.engine)
self.session = db.Session()
def teardown_method(self, method):
self.session.close()
db.Base.metadata.drop_all(db.engine)
| <commit_before><commit_msg>Add database helpers to test base<commit_after> | from kitten import db
class MockDatabaseMixin(object):
def setup_method(self, method):
db.Base.metadata.create_all(db.engine)
self.session = db.Session()
def teardown_method(self, method):
self.session.close()
db.Base.metadata.drop_all(db.engine)
| Add database helpers to test basefrom kitten import db
class MockDatabaseMixin(object):
def setup_method(self, method):
db.Base.metadata.create_all(db.engine)
self.session = db.Session()
def teardown_method(self, method):
self.session.close()
db.Base.metadata.drop_all(db.engin... | <commit_before><commit_msg>Add database helpers to test base<commit_after>from kitten import db
class MockDatabaseMixin(object):
def setup_method(self, method):
db.Base.metadata.create_all(db.engine)
self.session = db.Session()
def teardown_method(self, method):
self.session.close()
... | |
ee65b4ecd9a94598e1fa9fe2a8a25697c2480477 | test/conftest.py | test/conftest.py | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | Clear caches in test item teardown | test: Clear caches in test item teardown
Rather than relying on the user manually clearing the COFS function
cache and linear problem cache, clear them in the teardown step of each
test.
| Python | mit | tkarna/cofs | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | <commit_before>import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | <commit_before>import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that... |
bf961cf69386404b03d46ebc3ab34b7da804f016 | test/test_ttt.py | test/test_ttt.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
import unittest
from ttt import ttt
class TestPat(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(self):
pass
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
class Test:
def setup(self):
pass
def teardown(self):
pass
def test_(self):
pass
| Use pytest instead of unittest | Use pytest instead of unittest
| Python | isc | yerejm/ttt,yerejm/ttt | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
import unittest
from ttt import ttt
class TestPat(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(self):
pass
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
class Test:
def setup(self):
pass
def teardown(self):
pass
def test_(self):
pass
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
import unittest
from ttt import ttt
class TestPat(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(self):... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
class Test:
def setup(self):
pass
def teardown(self):
pass
def test_(self):
pass
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
import unittest
from ttt import ttt
class TestPat(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(self):
pass
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ttt
----------------------------------
Tests for `ttt` module.
"""
import unittest
from ttt import ttt
class TestPat(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(self):... |
43dce889a79b77445eebe0d0e15532b64e7728d5 | tests/test_upbeatbot.py | tests/test_upbeatbot.py | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_bot._get_animal_from_mes... | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_get_animal_from_message_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_... | Use more descriptive unit test names | Use more descriptive unit test names
| Python | mit | nickdibari/UpBeatBot | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_bot._get_animal_from_mes... | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_get_animal_from_message_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_... | <commit_before>import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_bot._get_... | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_get_animal_from_message_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_... | import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_bot._get_animal_from_mes... | <commit_before>import unittest
from libs.upbeatbot import UpBeatBot
class TestUpbeatBot(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.upbeat_bot = UpBeatBot()
def test_chosen_animal_returned(self):
tweet = 'Hey @upbeatbot send me a dog!'
animal = self.upbeat_bot._get_... |
66fc59842fb85bb7b9d1434b7ba6d279c2f454df | tip/algorithms/sorting/mergesort.py | tip/algorithms/sorting/mergesort.py | def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
| def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v]+ merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
| Add intended error to see flake8 report | Add intended error to see flake8 report
| Python | unlicense | davidgasquez/tip | def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
Add intended error to see ... | def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v]+ merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
| <commit_before>def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
<commit_msg... | def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v]+ merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
| def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
Add intended error to see ... | <commit_before>def merge(a, b):
if len(a) * len(b) == 0:
return a + b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(list):
if len(list) < 2:
return list
m = len(list) / 2
return merge(mergesort(list[:int(m)]), mergesort(list[int(m):]))
<commit_msg... |
12b313ed0be7049335046a00844c378b0bed7064 | helpernmap.py | helpernmap.py | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('----------------------------------------------------')... | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
if self.__setParams():
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts=str(self.args), arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('--------------------... | Add network target as a params | Add network target as a params
Signed-off-by: Jacobo Tibaquira <d8d2a0ed36dd5f2e41c721fffbe8af2e7e4fe993@gmail.com>
| Python | apache-2.0 | JKO/nsearch,JKO/nsearch | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('----------------------------------------------------')... | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
if self.__setParams():
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts=str(self.args), arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('--------------------... | <commit_before>import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('---------------------------------------... | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
if self.__setParams():
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts=str(self.args), arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('--------------------... | import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('----------------------------------------------------')... | <commit_before>import nmap
class HelperNmap:
def __init__(self,args=""):
self.args = args
def process(self):
print "Running Scan"
nm = nmap.PortScanner()
nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')
for host in nm.all_hosts():
print('---------------------------------------... |
2dc031aca46c02449eb85ee5149b75951e26e3b9 | deferrable/backend/sqs.py | deferrable/backend/sqs.py | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):
"""To allow backends to be initialized lazily, this factory requires a thunk
(parameter-less closure) wh... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, name_suffix=None):
"""To allow backends to be initialized lazily, this factory requires a thunk
(paramete... | Add naming suffix option for SQS backends | Add naming suffix option for SQS backends
| Python | mit | gamechanger/deferrable | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):
"""To allow backends to be initialized lazily, this factory requires a thunk
(parameter-less closure) wh... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, name_suffix=None):
"""To allow backends to be initialized lazily, this factory requires a thunk
(paramete... | <commit_before>from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):
"""To allow backends to be initialized lazily, this factory requires a thunk
(parameter-l... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, name_suffix=None):
"""To allow backends to be initialized lazily, this factory requires a thunk
(paramete... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):
"""To allow backends to be initialized lazily, this factory requires a thunk
(parameter-less closure) wh... | <commit_before>from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):
"""To allow backends to be initialized lazily, this factory requires a thunk
(parameter-l... |
5da99ceeeec050b2732475ffca89a64d2d10f34e | trainTweet.py | trainTweet.py | #!/usr/bin/env python
import subprocess
import argparse
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train Number. Ex:... | #!/usr/bin/env python
import subprocess
import argparse
import os
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train N... | Use full paths & print our current command fully | Use full paths & print our current command fully
| Python | mit | dmiedema/train-500-status | #!/usr/bin/env python
import subprocess
import argparse
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train Number. Ex:... | #!/usr/bin/env python
import subprocess
import argparse
import os
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train N... | <commit_before>#!/usr/bin/env python
import subprocess
import argparse
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Tr... | #!/usr/bin/env python
import subprocess
import argparse
import os
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train N... | #!/usr/bin/env python
import subprocess
import argparse
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Train Number. Ex:... | <commit_before>#!/usr/bin/env python
import subprocess
import argparse
parser = argparse.ArgumentParser(description="Tweet some Train Statuses!")
parser.add_argument("-s", "--station", dest="station", type=str, help="Station Short Code. Ex: 'SLM'")
parser.add_argument("-t", "--train", dest="train", type=int, help="Tr... |
605340f9c18f1591846e0a9b5f9c983c940d80c9 | tests/models/test_repository.py | tests/models/test_repository.py | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | Test if we look after a non-existing repo | Test if we look after a non-existing repo
| Python | bsd-2-clause | PressLabs/pyolite,shawkinsl/pyolite | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | <commit_before>from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
... | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
mocked_path... | <commit_before>from nose.tools import eq_
from mock import MagicMock, patch
from pyolite.models.repository import Repository
class TestRepositoryModel(object):
def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):
mocked_users = MagicMock()
mocked_file = MagicMock()
mocked_dir = MagicMock()
... |
09dad7d36c6968fc50cf8f2c475608a66bd6571a | plugins/expand.py | plugins/expand.py | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | Add tinyurl.com as a minifier | Add tinyurl.com as a minifier
| Python | bsd-2-clause | p0nce/tofbot,tofbot/tofbot,chmduquesne/tofbot,p0nce/tofbot,soulaklabs/tofbot,tofbot/tofbot,martinkirch/tofbot,martinkirch/tofbot,soulaklabs/tofbot | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | <commit_before># -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from B... | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | # -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from BeautifulSoup im... | <commit_before># -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2012 Etienne Millon <etienne.millon@gmail.com>
from B... |
66bc3ca0f9bd0e2b20d772e694c819b937a0c346 | pogom/pokeller.py | pogom/pokeller.py | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | Add a debug message to find an unexpected error | Add a debug message to find an unexpected error
| Python | mit | falau/pogom,falau/pogom,falau/pogom | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | <commit_before># -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_p... | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | # -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_poller'
... | <commit_before># -*- coding: utf-8 -*-
import logging
import time
from threading import Thread
from .models import Pokemon
log = logging.getLogger(__name__)
log.setLevel(level=10)
class PokePoller(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
self.name = 'pokemon_p... |
34e211c2cc3021be7497eb48e68f557c56a2a1ea | django_assets/__init__.py | django_assets/__init__.py | __version__ = (0, 2)
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register | __version__ = (0, 3, 'dev')
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register | Increment to next dev version. | Increment to next dev version. | Python | bsd-2-clause | scorphus/webassets,wijerasa/webassets,heynemann/webassets,wijerasa/webassets,heynemann/webassets,florianjacob/webassets,john2x/webassets,JDeuce/webassets,scorphus/webassets,glorpen/webassets,aconrad/webassets,JDeuce/webassets,aconrad/webassets,john2x/webassets,florianjacob/webassets,glorpen/webassets,glorpen/webassets,... | __version__ = (0, 2)
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import registerIncrement to next dev version. | __version__ = (0, 3, 'dev')
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register | <commit_before>__version__ = (0, 2)
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register<commit_msg>Increment to next dev version.<commit_after> | __version__ = (0, 3, 'dev')
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register | __version__ = (0, 2)
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import registerIncrement to next dev version.__version__ = (0, 3, 'dev')
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register | <commit_before>__version__ = (0, 2)
# Make a couple frequently used things available right here.
from bundle import Bundle
from registry import register<commit_msg>Increment to next dev version.<commit_after>__version__ = (0, 3, 'dev')
# Make a couple frequently used things available right here.
from bundle import ... |
1c1ca68a41e56cb912a9ec9f81ab974324f9d2f4 | tests/test_filter_refs_prefs.py | tests/test_filter_refs_prefs.py | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"""
results ... | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import os.path
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"... | Add test for silent fail when creating Alfred data dir | Add test for silent fail when creating Alfred data dir
| Python | mit | caleb531/youversion-suggest,caleb531/youversion-suggest | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"""
results ... | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import os.path
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"... | <commit_before># tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"... | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import os.path
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"... | # tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"""
results ... | <commit_before># tests.test_filter_refs_prefs
# coding=utf-8
from __future__ import unicode_literals
import nose.tools as nose
import yvs.filter_refs as yvs
from tests.decorators import use_prefs
@use_prefs({'language': 'en', 'version': 59})
def test_version_persistence():
"""should remember version preferences"... |
72bc4597e172a5c276057c543998337038ef15f5 | projects/views.py | projects/views.py | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | Add missing include, and switch to exclude projects with HIDDEN status from public display | Add missing include, and switch to exclude projects with HIDDEN status from public display
| Python | agpl-3.0 | lo-windigo/fragdev,lo-windigo/fragdev | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | <commit_before># This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | <commit_before># This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... |
6798df4657730484549fdeaa13578c2d7e36f4eb | udiskie/automount.py | udiskie/automount.py | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | Add function in AutoMounter to handle mounting of LUKS-devices not opened by udiskie | Add function in AutoMounter to handle mounting of LUKS-devices not opened by udiskie
| Python | mit | pstray/udiskie,coldfix/udiskie,coldfix/udiskie,mathstuf/udiskie,khardix/udiskie,pstray/udiskie | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | <commit_before>"""
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def me... | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | """
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def media_added(self,... | <commit_before>"""
Udiskie automounter daemon.
"""
__all__ = ['AutoMounter']
class AutoMounter(object):
"""
Automatically mount newly added media.
"""
def __init__(self, mounter):
self._mounter = mounter
def device_added(self, udevice):
self._mounter.add_device(udevice)
def me... |
3a4b274d4a7e23911843250c73da2ab59cf6649c | tests/alerts/alert_test_case.py | tests/alerts/alert_test_case.py | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], events_type='event', expected_alert=None):
self.description = description
# As a r... | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], expected_alert=None):
self.description = description
# As a result of defining our... | Remove events_type from alert test case | Remove events_type from alert test case
| Python | mpl-2.0 | mpurzynski/MozDef,jeffbryner/MozDef,mozilla/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,jeffbryner/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,jeffbryner/MozDef,mozilla/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,mozilla/MozDef,mozilla/MozDef | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], events_type='event', expected_alert=None):
self.description = description
# As a r... | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], expected_alert=None):
self.description = description
# As a result of defining our... | <commit_before>import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], events_type='event', expected_alert=None):
self.description = description
... | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], expected_alert=None):
self.description = description
# As a result of defining our... | import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], events_type='event', expected_alert=None):
self.description = description
# As a r... | <commit_before>import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts"))
from alert_test_suite import AlertTestSuite
class AlertTestCase(object):
def __init__(self, description, events=[], events_type='event', expected_alert=None):
self.description = description
... |
ef56181a5c42ab6dc9283822a9a6214f0a97475f | yolk/__init__.py | yolk/__init__.py | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.5.2'
| """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6'
| Increment minor version to 0.6 | Increment minor version to 0.6
| Python | bsd-3-clause | myint/yolk,myint/yolk | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.5.2'
Increment minor version to 0.6 | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6'
| <commit_before>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.5.2'
<commit_msg>Increment minor version to 0.6<commit_after> | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6'
| """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.5.2'
Increment minor version to 0.6"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6'
| <commit_before>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.5.2'
<commit_msg>Increment minor version to 0.6<commit_after>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6'
|
4a75d2b12fdaea392e3cf74eb1335b93c8aacdbd | accounts/tests/test_models.py | accounts/tests/test_models.py | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
"""Should not raise... | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
USER = get_user_model()
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
... | Tidy up UserModel unit test | Tidy up UserModel unit test
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
"""Should not raise... | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
USER = get_user_model()
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
... | <commit_before>"""accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
"""S... | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
USER = get_user_model()
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
... | """accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
"""Should not raise... | <commit_before>"""accounts app unittests for models
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
TEST_EMAIL = 'newvisitor@example.com'
class UserModelTest(TestCase):
"""Tests for passwordless user model.
"""
def test_user_valid_with_only_email(self):
"""S... |
207871f4f057d88f67bad0c371f880664dcee062 | pydirections/route_requester.py | pydirections/route_requester.py | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, mode="driving", **kwargs):
self.mode = mode
self.origin = kwargs['origin']
self.destination = kwarg... | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, **kwargs):
self.mode = "driving"
self.origin = kwargs['origin']
self.destination = kwargs['destinat... | Build custom route requester class | Build custom route requester class
| Python | apache-2.0 | apranav19/pydirections | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, mode="driving", **kwargs):
self.mode = mode
self.origin = kwargs['origin']
self.destination = kwarg... | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, **kwargs):
self.mode = "driving"
self.origin = kwargs['origin']
self.destination = kwargs['destinat... | <commit_before>"""
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, mode="driving", **kwargs):
self.mode = mode
self.origin = kwargs['origin']
self.dest... | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, **kwargs):
self.mode = "driving"
self.origin = kwargs['origin']
self.destination = kwargs['destinat... | """
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, mode="driving", **kwargs):
self.mode = mode
self.origin = kwargs['origin']
self.destination = kwarg... | <commit_before>"""
This class holds all the necessary information required for a proposed route
"""
ACCEPTABLE_MODES = set(["driving", "walking", "bicycling", "transit"])
class DirectionsRequest(object):
def __init__(self, mode="driving", **kwargs):
self.mode = mode
self.origin = kwargs['origin']
self.dest... |
9c12e2d6890a32d93ea6b2a9ae6f000d46182377 | ga/image/store.py | ga/image/store.py | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
conn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)
bucket = conn.get_bucket(settings.AWS_BUCKET)
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.s... | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.save(output, 'JPEG')
output.name = 'file'
return upload_image(output)
def upload_image(stream):
... | Move S3 bucket connection into `upload_image` | Move S3 bucket connection into `upload_image`
| Python | mit | alexmic/great-again,alexmic/great-again | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
conn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)
bucket = conn.get_bucket(settings.AWS_BUCKET)
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.s... | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.save(output, 'JPEG')
output.name = 'file'
return upload_image(output)
def upload_image(stream):
... | <commit_before># -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
conn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)
bucket = conn.get_bucket(settings.AWS_BUCKET)
def upload_image_from_pil_image(image):
output = StringIO.StringI... | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.save(output, 'JPEG')
output.name = 'file'
return upload_image(output)
def upload_image(stream):
... | # -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
conn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)
bucket = conn.get_bucket(settings.AWS_BUCKET)
def upload_image_from_pil_image(image):
output = StringIO.StringIO()
image.s... | <commit_before># -*- coding: utf-8 -*-
import StringIO
import shortuuid
from boto.s3.connection import S3Connection
from ga import settings
conn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)
bucket = conn.get_bucket(settings.AWS_BUCKET)
def upload_image_from_pil_image(image):
output = StringIO.StringI... |
2293539766043db129dc32634cedced7377eb9fe | Lib/test/test_wave.py | Lib/test/test_wave.py | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframer... | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'wb')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframe... | Use binary mode to open "wave" files. | Use binary mode to open "wave" files.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframer... | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'wb')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframe... | <commit_before>from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f.setnchannels(nchannels)
f.setsampwidth(sampwid... | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'wb')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframe... | from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframer... | <commit_before>from test_support import TestFailed
import os, tempfile
import wave
def check(t, msg=None):
if not t:
raise TestFailed, msg
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f.setnchannels(nchannels)
f.setsampwidth(sampwid... |
1666f883e3f6a497971b484c9ba875df2f6693a2 | test/testall.py | test/testall.py | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | Fix python namespaces for test runs | Fix python namespaces for test runs
We need to make sure we don't use namespaced versions that are already installed
on the system but rather use local version from current sources
| Python | mit | SusannaMaria/beets,mathstuf/beets,mathstuf/beets,YetAnotherNerd/beets,lengtche/beets,LordSputnik/beets,shamangeorge/beets,ibmibmibm/beets,m-urban/beets,krig/beets,lightwang1/beets,shamangeorge/beets,MyTunesFreeMusic/privacy-policy,jcoady9/beets,SusannaMaria/beets,beetbox/beets,Andypsamp/CODfinalJUNIT,Andypsamp/CODfinal... | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | <commit_before>#!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# withou... | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | <commit_before>#!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# withou... |
aa4a0b1640dab90a4867614f0d00cca99601e342 | south/models.py | south/models.py | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
class Meta:
unique_together = (('app_name', 'migration'),)
@classmethod
def for_migrat... | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
@classmethod
def for_migration(cls, migration):
try:
return cls.objects.get(app... | Remove unique_together on the model; the key length was too long on wide-character MySQL installs. | Remove unique_together on the model; the key length was too long on wide-character MySQL installs.
| Python | apache-2.0 | theatlantic/django-south,theatlantic/django-south | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
class Meta:
unique_together = (('app_name', 'migration'),)
@classmethod
def for_migrat... | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
@classmethod
def for_migration(cls, migration):
try:
return cls.objects.get(app... | <commit_before>from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
class Meta:
unique_together = (('app_name', 'migration'),)
@classmethod
... | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
@classmethod
def for_migration(cls, migration):
try:
return cls.objects.get(app... | from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
class Meta:
unique_together = (('app_name', 'migration'),)
@classmethod
def for_migrat... | <commit_before>from django.db import models
class MigrationHistory(models.Model):
app_name = models.CharField(max_length=255)
migration = models.CharField(max_length=255)
applied = models.DateTimeField(blank=True)
class Meta:
unique_together = (('app_name', 'migration'),)
@classmethod
... |
cfa77bed245d80d453f7b463ea35473bbc29cc50 | toolkits/rdk.py | toolkits/rdk.py | import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
| import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
# Patch reader not to return None as molecules
def _readfile(format, filename):
for mol in r... | Patch readfile not to return mols | Patch readfile not to return mols
| Python | bsd-3-clause | mwojcikowski/opendrugdiscovery | import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
Patch readfile not to return mols | import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
# Patch reader not to return None as molecules
def _readfile(format, filename):
for mol in r... | <commit_before>import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
<commit_msg>Patch readfile not to return mols<commit_after> | import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
# Patch reader not to return None as molecules
def _readfile(format, filename):
for mol in r... | import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
Patch readfile not to return molsimport numpy as np
from cinfony import rdk
from cinfony.rdk impo... | <commit_before>import numpy as np
from cinfony import rdk
from cinfony.rdk import *
class Fingerprint(rdk.Fingerprint):
@property
def raw(self):
return np.array(self.fp, dtype=bool)
rdk.Fingerprint = Fingerprint
<commit_msg>Patch readfile not to return mols<commit_after>import numpy as np
from... |
e6c774c13a01f2cbe09947c39c1dac7b4989bebc | jason2/project.py | jason2/project.py | class Project(object):
"""Holds project configuration parameters, such as data directory."""
def __init__(self, data_directory):
self.data_directory = data_directory
| import ConfigParser
class Project(object):
"""Holds project configuration parameters, such as data directory."""
@classmethod
def from_config(cls, filename):
config = ConfigParser.RawConfigParser()
config.read(filename)
return cls(config.get("data", "directory"))
def __init__... | Add from_configfile method to Project | Add from_configfile method to Project
| Python | mit | gadomski/jason2 | class Project(object):
"""Holds project configuration parameters, such as data directory."""
def __init__(self, data_directory):
self.data_directory = data_directory
Add from_configfile method to Project | import ConfigParser
class Project(object):
"""Holds project configuration parameters, such as data directory."""
@classmethod
def from_config(cls, filename):
config = ConfigParser.RawConfigParser()
config.read(filename)
return cls(config.get("data", "directory"))
def __init__... | <commit_before>class Project(object):
"""Holds project configuration parameters, such as data directory."""
def __init__(self, data_directory):
self.data_directory = data_directory
<commit_msg>Add from_configfile method to Project<commit_after> | import ConfigParser
class Project(object):
"""Holds project configuration parameters, such as data directory."""
@classmethod
def from_config(cls, filename):
config = ConfigParser.RawConfigParser()
config.read(filename)
return cls(config.get("data", "directory"))
def __init__... | class Project(object):
"""Holds project configuration parameters, such as data directory."""
def __init__(self, data_directory):
self.data_directory = data_directory
Add from_configfile method to Projectimport ConfigParser
class Project(object):
"""Holds project configuration parameters, such as ... | <commit_before>class Project(object):
"""Holds project configuration parameters, such as data directory."""
def __init__(self, data_directory):
self.data_directory = data_directory
<commit_msg>Add from_configfile method to Project<commit_after>import ConfigParser
class Project(object):
"""Holds p... |
1a90e2c7b9155f35ced7e8f51707a2d86ad3ca93 | scripts/Driver.py | scripts/Driver.py | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
debug = True
if __name__ == '__main__':
#open the XML
try:
inputFile = 'test.xml' #sys.argv[1]
except:
raise IOError ('input file not provided')
workingDir = os.getcwd()
if ... | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
import sys
debug = True
if __name__ == '__main__':
#open the XML
try:
if len(sys.argv) == 1:
inputFile = 'test.xml'
else:
inputFile = sys.argv[1]
except:
raise ... | Allow different input files to be specified. | Allow different input files to be specified.
r18478
| Python | apache-2.0 | joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,idaholab/raven,joshua-cogliati-inl/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,joshua-cogliati-inl/raven | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
debug = True
if __name__ == '__main__':
#open the XML
try:
inputFile = 'test.xml' #sys.argv[1]
except:
raise IOError ('input file not provided')
workingDir = os.getcwd()
if ... | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
import sys
debug = True
if __name__ == '__main__':
#open the XML
try:
if len(sys.argv) == 1:
inputFile = 'test.xml'
else:
inputFile = sys.argv[1]
except:
raise ... | <commit_before>'''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
debug = True
if __name__ == '__main__':
#open the XML
try:
inputFile = 'test.xml' #sys.argv[1]
except:
raise IOError ('input file not provided')
workingDir = os... | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
import sys
debug = True
if __name__ == '__main__':
#open the XML
try:
if len(sys.argv) == 1:
inputFile = 'test.xml'
else:
inputFile = sys.argv[1]
except:
raise ... | '''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
debug = True
if __name__ == '__main__':
#open the XML
try:
inputFile = 'test.xml' #sys.argv[1]
except:
raise IOError ('input file not provided')
workingDir = os.getcwd()
if ... | <commit_before>'''
Created on Feb 20, 2013
@author: crisr
'''
import xml.etree.ElementTree as ET
import os
from Simulation import Simulation
debug = True
if __name__ == '__main__':
#open the XML
try:
inputFile = 'test.xml' #sys.argv[1]
except:
raise IOError ('input file not provided')
workingDir = os... |
686406781af00d93e4d70049499068037d72be74 | geotrek/core/tests/test_forms.py | geotrek/core/tests/test_forms.py | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with dynamic segmentation onl... | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory, PathFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm, PathForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with d... | Add tests for path overlapping check | Add tests for path overlapping check
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with dynamic segmentation onl... | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory, PathFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm, PathForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with d... | <commit_before>from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with dynamic s... | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory, PathFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm, PathForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with d... | from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with dynamic segmentation onl... | <commit_before>from django.conf import settings
from django.test import TestCase
from unittest import skipIf
from geotrek.core.factories import TrailFactory
from geotrek.authent.factories import UserFactory
from geotrek.core.forms import TrailForm
@skipIf(not settings.TREKKING_TOPOLOGY_ENABLED, 'Test with dynamic s... |
4b26066a6f3b666ec107621334ddbcceec6a819a | micro/read_code.py | micro/read_code.py | import fileinput
def read_code():
return ''.join([line for line in fileinput.input()])
if __name__ == '__main__':
code = read_code()
print(code)
| import fileinput
def read_code(filename='-'):
return ''.join([line for line in fileinput.input(filename)])
if __name__ == '__main__':
import sys
filename = sys.argv[1] if len(sys.argv) > 1 else '-'
code = read_code(filename)
print(code)
| Correct a reading of a code | Correct a reading of a code
| Python | mit | thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro | import fileinput
def read_code():
return ''.join([line for line in fileinput.input()])
if __name__ == '__main__':
code = read_code()
print(code)
Correct a reading of a code | import fileinput
def read_code(filename='-'):
return ''.join([line for line in fileinput.input(filename)])
if __name__ == '__main__':
import sys
filename = sys.argv[1] if len(sys.argv) > 1 else '-'
code = read_code(filename)
print(code)
| <commit_before>import fileinput
def read_code():
return ''.join([line for line in fileinput.input()])
if __name__ == '__main__':
code = read_code()
print(code)
<commit_msg>Correct a reading of a code<commit_after> | import fileinput
def read_code(filename='-'):
return ''.join([line for line in fileinput.input(filename)])
if __name__ == '__main__':
import sys
filename = sys.argv[1] if len(sys.argv) > 1 else '-'
code = read_code(filename)
print(code)
| import fileinput
def read_code():
return ''.join([line for line in fileinput.input()])
if __name__ == '__main__':
code = read_code()
print(code)
Correct a reading of a codeimport fileinput
def read_code(filename='-'):
return ''.join([line for line in fileinput.input(filename)])
if __name__ == '__mai... | <commit_before>import fileinput
def read_code():
return ''.join([line for line in fileinput.input()])
if __name__ == '__main__':
code = read_code()
print(code)
<commit_msg>Correct a reading of a code<commit_after>import fileinput
def read_code(filename='-'):
return ''.join([line for line in fileinput... |
9be37b96450780b41f5a5443568ca41a18e06d22 | lcapy/sequence.py | lcapy/sequence.py | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | Add pretty and latex for Sequence | Add pretty and latex for Sequence
| Python | lgpl-2.1 | mph-/lcapy | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | <commit_before>"""This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence co... | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | """This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence corresponds to n ... | <commit_before>"""This module handles sequences.
Copyright 2020 Michael Hayes, UCECE
"""
from .expr import ExprList
class Sequence(ExprList):
def __init__(self, seq, n=None):
super (Sequence, self).__init__(seq)
# Save the indexes. Ideally, should annotate which item
# in sequence co... |
4559e01646010e1ed260d77e612774778a0c1359 | lib/rfk/site/forms/login.py | lib/rfk/site/forms/login.py | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | Make it clear that the E-Mail address is optional. | Make it clear that the E-Mail address is optional.
| Python | bsd-3-clause | buckket/weltklang,buckket/weltklang,krautradio/PyRfK,krautradio/PyRfK,krautradio/PyRfK,buckket/weltklang,buckket/weltklang,krautradio/PyRfK | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | <commit_before>from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
rem... | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
remember = Boolean... | <commit_before>from wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \
PasswordField, IntegerField, FieldList, FormField, validators
class LoginForm(Form):
username = TextField('Username', [validators.Required()])
password = PasswordField('Password', [validators.Required()])
rem... |
3d9bf8afd912ccb0d1df72353a9c306c59773007 | swf/exceptions.py | swf/exceptions.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | Update SWFError with a formatted type | Update SWFError with a formatted type
| Python | mit | botify-labs/python-simple-workflow,botify-labs/python-simple-workflow | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details =... | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details = raw_error.spli... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
class SWFError(Exception):
def __init__(self, message, raw_error, *args):
Exception.__init__(self, message, *args)
self.kind, self.details =... |
458688aa3a1ce901b2ffcf64497965484cea4e53 | temperature_db.py | temperature_db.py | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | Update the DB-inserting script for wifi. | Update the DB-inserting script for wifi.
| Python | mit | zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | <commit_before>#!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').... | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | #!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').readlines()
... | <commit_before>#!/usr/bin/env python
"""Temperature into database"""
import glob
from time import sleep
import urllib2
import urllib
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
try:
while True:
lines = open(device_file, 'r').... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.