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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6fbe2615770cfccf5b1711bf1a1c51bb14334341
|
txircd/modules/cmode_s.py
|
txircd/modules/cmode_s.py
|
from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCHNICK, chan, ":No such nick/channel")
remove.append(chan)
for chan in remove:
data["targetchan"].remove(chan)
return data
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
Hide secret channels from /NAMES users
|
Hide secret channels from /NAMES users
|
Python
|
bsd-3-clause
|
ElementalAlchemist/txircd,DesertBus/txircd,Heufneutje/txircd
|
from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)Hide secret channels from /NAMES users
|
from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCHNICK, chan, ":No such nick/channel")
remove.append(chan)
for chan in remove:
data["targetchan"].remove(chan)
return data
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
<commit_before>from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)<commit_msg>Hide secret channels from /NAMES users<commit_after>
|
from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCHNICK, chan, ":No such nick/channel")
remove.append(chan)
for chan in remove:
data["targetchan"].remove(chan)
return data
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)Hide secret channels from /NAMES usersfrom twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCHNICK, chan, ":No such nick/channel")
remove.append(chan)
for chan in remove:
data["targetchan"].remove(chan)
return data
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
<commit_before>from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)<commit_msg>Hide secret channels from /NAMES users<commit_after>from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCHNICK, chan, ":No such nick/channel")
remove.append(chan)
for chan in remove:
data["targetchan"].remove(chan)
return data
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
self.mode_s = None
def spawn(self):
self.mode_s = SecretMode()
return {
"modes": {
"cns": self.mode_s
},
"actions": {
"commandextra": [self.mode_s.listOutput]
}
}
def cleanup(self):
self.ircd.removeMode("cns")
self.ircd.actions["commandextra"].remove(self.mode_s.listOutput)
|
79c9ee6107b841986054915c23f8456c80097c5b
|
osgtest/tests/test_13_gridftp.py
|
osgtest/tests/test_13_gridftp.py
|
import os
import osgtest.library.core as core
import unittest
class TestStartGridFTP(unittest.TestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
if not core.rpm_is_installed('globus-gridftp-server-progs'):
core.skip('not installed')
return
if os.path.exists(core.config['gridftp.pid-file']):
core.skip('apparently running')
return
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
import os
from osgtest.library import core, osgunittest
import unittest
class TestStartGridFTP(osgunittest.OSGTestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
core.skip_ok_unless_installed('globus-gridftp-server-progs')
self.skip_ok_if(os.path.exists(core.config['gridftp.pid-file']), 'already running')
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
Update 13_gridftp to use OkSkip functionality
|
Update 13_gridftp to use OkSkip functionality
git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@16527 4e558342-562e-0410-864c-e07659590f8c
|
Python
|
apache-2.0
|
efajardo/osg-test,efajardo/osg-test
|
import os
import osgtest.library.core as core
import unittest
class TestStartGridFTP(unittest.TestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
if not core.rpm_is_installed('globus-gridftp-server-progs'):
core.skip('not installed')
return
if os.path.exists(core.config['gridftp.pid-file']):
core.skip('apparently running')
return
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
Update 13_gridftp to use OkSkip functionality
git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@16527 4e558342-562e-0410-864c-e07659590f8c
|
import os
from osgtest.library import core, osgunittest
import unittest
class TestStartGridFTP(osgunittest.OSGTestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
core.skip_ok_unless_installed('globus-gridftp-server-progs')
self.skip_ok_if(os.path.exists(core.config['gridftp.pid-file']), 'already running')
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
<commit_before>import os
import osgtest.library.core as core
import unittest
class TestStartGridFTP(unittest.TestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
if not core.rpm_is_installed('globus-gridftp-server-progs'):
core.skip('not installed')
return
if os.path.exists(core.config['gridftp.pid-file']):
core.skip('apparently running')
return
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
<commit_msg>Update 13_gridftp to use OkSkip functionality
git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@16527 4e558342-562e-0410-864c-e07659590f8c<commit_after>
|
import os
from osgtest.library import core, osgunittest
import unittest
class TestStartGridFTP(osgunittest.OSGTestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
core.skip_ok_unless_installed('globus-gridftp-server-progs')
self.skip_ok_if(os.path.exists(core.config['gridftp.pid-file']), 'already running')
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
import os
import osgtest.library.core as core
import unittest
class TestStartGridFTP(unittest.TestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
if not core.rpm_is_installed('globus-gridftp-server-progs'):
core.skip('not installed')
return
if os.path.exists(core.config['gridftp.pid-file']):
core.skip('apparently running')
return
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
Update 13_gridftp to use OkSkip functionality
git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@16527 4e558342-562e-0410-864c-e07659590f8cimport os
from osgtest.library import core, osgunittest
import unittest
class TestStartGridFTP(osgunittest.OSGTestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
core.skip_ok_unless_installed('globus-gridftp-server-progs')
self.skip_ok_if(os.path.exists(core.config['gridftp.pid-file']), 'already running')
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
<commit_before>import os
import osgtest.library.core as core
import unittest
class TestStartGridFTP(unittest.TestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
if not core.rpm_is_installed('globus-gridftp-server-progs'):
core.skip('not installed')
return
if os.path.exists(core.config['gridftp.pid-file']):
core.skip('apparently running')
return
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
<commit_msg>Update 13_gridftp to use OkSkip functionality
git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@16527 4e558342-562e-0410-864c-e07659590f8c<commit_after>import os
from osgtest.library import core, osgunittest
import unittest
class TestStartGridFTP(osgunittest.OSGTestCase):
def test_01_start_gridftp(self):
core.config['gridftp.pid-file'] = '/var/run/globus-gridftp-server.pid'
core.state['gridftp.started-server'] = False
core.skip_ok_unless_installed('globus-gridftp-server-progs')
self.skip_ok_if(os.path.exists(core.config['gridftp.pid-file']), 'already running')
command = ('service', 'globus-gridftp-server', 'start')
stdout, _, fail = core.check_system(command, 'Start GridFTP server')
self.assert_(stdout.find('FAILED') == -1, fail)
self.assert_(os.path.exists(core.config['gridftp.pid-file']),
'GridFTP server PID file missing')
core.state['gridftp.started-server'] = True
|
6a1f01dd815bf8054a30a85acafa233c8b397c6d
|
read_DS18B20.py
|
read_DS18B20.py
|
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp():
lines = read_temp_raw()
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw()
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print(read_temp())
time.sleep(1)
|
import datetime
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folders = glob.glob(base_dir + '28-*')
devices = map(lambda x: os.path.basename(x), device_folders)
device_files = map(lambda x: x + '/w1_slave', device_folders)
def read_temp_raw(device):
device_file = base_dir + device + '/w1_slave'
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp(device):
lines = read_temp_raw(device)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print datetime.datetime.now()
for device in devices:
print(device, read_temp(device))
time.sleep(1)
|
Augment read to handle multiple connected DS18B20 devices
|
Augment read to handle multiple connected DS18B20 devices
|
Python
|
mit
|
barecode/iot_temp_sensors,barecode/iot_temp_sensors,barecode/iot_temp_sensors
|
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp():
lines = read_temp_raw()
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw()
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print(read_temp())
time.sleep(1)
Augment read to handle multiple connected DS18B20 devices
|
import datetime
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folders = glob.glob(base_dir + '28-*')
devices = map(lambda x: os.path.basename(x), device_folders)
device_files = map(lambda x: x + '/w1_slave', device_folders)
def read_temp_raw(device):
device_file = base_dir + device + '/w1_slave'
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp(device):
lines = read_temp_raw(device)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print datetime.datetime.now()
for device in devices:
print(device, read_temp(device))
time.sleep(1)
|
<commit_before>import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp():
lines = read_temp_raw()
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw()
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print(read_temp())
time.sleep(1)
<commit_msg>Augment read to handle multiple connected DS18B20 devices<commit_after>
|
import datetime
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folders = glob.glob(base_dir + '28-*')
devices = map(lambda x: os.path.basename(x), device_folders)
device_files = map(lambda x: x + '/w1_slave', device_folders)
def read_temp_raw(device):
device_file = base_dir + device + '/w1_slave'
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp(device):
lines = read_temp_raw(device)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print datetime.datetime.now()
for device in devices:
print(device, read_temp(device))
time.sleep(1)
|
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp():
lines = read_temp_raw()
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw()
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print(read_temp())
time.sleep(1)
Augment read to handle multiple connected DS18B20 devicesimport datetime
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folders = glob.glob(base_dir + '28-*')
devices = map(lambda x: os.path.basename(x), device_folders)
device_files = map(lambda x: x + '/w1_slave', device_folders)
def read_temp_raw(device):
device_file = base_dir + device + '/w1_slave'
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp(device):
lines = read_temp_raw(device)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print datetime.datetime.now()
for device in devices:
print(device, read_temp(device))
time.sleep(1)
|
<commit_before>import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp():
lines = read_temp_raw()
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw()
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print(read_temp())
time.sleep(1)
<commit_msg>Augment read to handle multiple connected DS18B20 devices<commit_after>import datetime
import os
import glob
import time
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folders = glob.glob(base_dir + '28-*')
devices = map(lambda x: os.path.basename(x), device_folders)
device_files = map(lambda x: x + '/w1_slave', device_folders)
def read_temp_raw(device):
device_file = base_dir + device + '/w1_slave'
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read_temp(device):
lines = read_temp_raw(device)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
temp_f = temp_c * 9.0 / 5.0 + 32.0
return temp_c, temp_f
while True:
print datetime.datetime.now()
for device in devices:
print(device, read_temp(device))
time.sleep(1)
|
8f6044c539138d7e44c4046c6c371471b8913090
|
setup.py
|
setup.py
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.1",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.2",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
Set pyRiffle version to 0.2.2.
|
Set pyRiffle version to 0.2.2.
|
Python
|
mit
|
exis-io/pyRiffle,exis-io/pyRiffle
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.1",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
Set pyRiffle version to 0.2.2.
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.2",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
<commit_before>from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.1",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
<commit_msg>Set pyRiffle version to 0.2.2.<commit_after>
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.2",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.1",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
Set pyRiffle version to 0.2.2.from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.2",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
<commit_before>from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.1",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
<commit_msg>Set pyRiffle version to 0.2.2.<commit_after>from setuptools import setup, Extension
setup(
name="pyRiffle",
version="0.2.2",
description="Riffle client libraries for interacting over a fabric",
author="Exis",
url="http://www.exis.io",
license="MIT",
packages=["riffle"],
include_package_data=True,
install_requires=[
'docopt>=0.6.2',
'greenlet>=0.4.9',
'PyYAML>=3.11'
],
entry_points={
'console_scripts': [
'exis = exis:main'
]
},
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
|
45e38ed249a390c6ca4bc36fdef55b9b05f0bc64
|
setup.py
|
setup.py
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests[security]>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
Drop the [security] descriptor from requests; it's soon deprecated
|
Drop the [security] descriptor from requests; it's soon deprecated
|
Python
|
mit
|
valohai/valohai-cli
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests[security]>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
Drop the [security] descriptor from requests; it's soon deprecated
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
<commit_before>from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests[security]>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
<commit_msg>Drop the [security] descriptor from requests; it's soon deprecated<commit_after>
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests[security]>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
Drop the [security] descriptor from requests; it's soon deprecatedfrom setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
<commit_before>from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests[security]>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
<commit_msg>Drop the [security] descriptor from requests; it's soon deprecated<commit_after>from setuptools import find_packages, setup
from valohai_cli import __version__
setup(
name='valohai-cli',
version=__version__,
entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},
author='Valohai',
author_email='hait@valohai.com',
license='MIT',
install_requires=[
'click>=7.0',
'valohai-yaml>=0.9',
'valohai-utils>=0.1.7',
'requests>=2.0.0',
'requests-toolbelt>=0.7.1',
'typing-extensions>=3.7',
],
python_requires='>=3.6',
packages=find_packages(include=('valohai_cli*',)),
)
|
ca254bb6a0b2056c454f9716460758fc5c4dda6d
|
setup.py
|
setup.py
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@webfilings.com',
url='http://github.com/WebFilings/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@workiva.com',
url='http://github.com/Workiva/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
Update Webfilings info to Workiva
|
Update Webfilings info to Workiva
|
Python
|
apache-2.0
|
beaulyddon-wf/furious,Workiva/furious,Workiva/furious,andreleblanc-wf/furious,mattsanders-wf/furious,beaulyddon-wf/furious,mattsanders-wf/furious,andreleblanc-wf/furious
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@webfilings.com',
url='http://github.com/WebFilings/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
Update Webfilings info to Workiva
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@workiva.com',
url='http://github.com/Workiva/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
<commit_before>from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@webfilings.com',
url='http://github.com/WebFilings/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
<commit_msg>Update Webfilings info to Workiva<commit_after>
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@workiva.com',
url='http://github.com/Workiva/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@webfilings.com',
url='http://github.com/WebFilings/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
Update Webfilings info to Workivafrom setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@workiva.com',
url='http://github.com/Workiva/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
<commit_before>from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@webfilings.com',
url='http://github.com/WebFilings/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
<commit_msg>Update Webfilings info to Workiva<commit_after>from setuptools import find_packages, setup
def get_version():
import imp
import os
with open(os.path.join('furious', '_pkg_meta.py'), 'rb') as f:
mod = imp.load_source('_pkg_meta', 'biloba', f)
return mod.version
setup_args = dict(
name='furious',
version=get_version(),
license='Apache',
description='Furious is a lightweight library that wraps Google App Engine'
'taskqueues to make building dynamic workflows easy.',
author='Robert Kluin',
author_email='robert.kluin@workiva.com',
url='http://github.com/Workiva/furious',
packages=find_packages(exclude=['example']),
download_url = "https://github.com/Workiva/furious/tarball/v1.3.0",
keywords = ['async', 'gae', 'appengine', 'taskqueue'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
if __name__ == '__main__':
setup(**setup_args)
|
33ff6b1d1311f77c9b1c2f6e5c18534d8f0d4019
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd>=1.1.0",
"unicodecsv>=0.14.1",
"formencode",
"unittest2",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd==1.2.0",
"unicodecsv==0.14.1",
"formencode==1.3.1",
"unittest2==1.1.0",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
Use same versions as requirements.pip to prevent unexpected upgrades of dependencies
|
Use same versions as requirements.pip to prevent unexpected upgrades of dependencies
|
Python
|
bsd-2-clause
|
XLSForm/pyxform,XLSForm/pyxform
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd>=1.1.0",
"unicodecsv>=0.14.1",
"formencode",
"unittest2",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
Use same versions as requirements.pip to prevent unexpected upgrades of dependencies
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd==1.2.0",
"unicodecsv==0.14.1",
"formencode==1.3.1",
"unittest2==1.1.0",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
<commit_before># -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd>=1.1.0",
"unicodecsv>=0.14.1",
"formencode",
"unittest2",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
<commit_msg>Use same versions as requirements.pip to prevent unexpected upgrades of dependencies<commit_after>
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd==1.2.0",
"unicodecsv==0.14.1",
"formencode==1.3.1",
"unittest2==1.1.0",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd>=1.1.0",
"unicodecsv>=0.14.1",
"formencode",
"unittest2",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
Use same versions as requirements.pip to prevent unexpected upgrades of dependencies# -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd==1.2.0",
"unicodecsv==0.14.1",
"formencode==1.3.1",
"unittest2==1.1.0",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
<commit_before># -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd>=1.1.0",
"unicodecsv>=0.14.1",
"formencode",
"unittest2",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
<commit_msg>Use same versions as requirements.pip to prevent unexpected upgrades of dependencies<commit_after># -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
REQUIRES = [
"xlrd==1.2.0",
"unicodecsv==0.14.1",
"formencode==1.3.1",
"unittest2==1.1.0",
'functools32==3.2.3.post2 ; python_version < "3.2"',
]
setup(
name="pyxform",
version="1.3.2",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),
package_data={
"pyxform.validators.odk_validate": ["bin/*.*"],
"pyxform.tests": [
"example_xls/*.*",
"fixtures/strings.ini",
"bug_example_xls/*.*",
"test_output/*.*",
"test_expected_output/*.*",
"validators/.*",
"validators/data/*.*",
"validators/data/.*",
],
"pyxform": ["iana_subtags.txt"],
},
url="http://pypi.python.org/pypi/pyxform/",
description="A Python package to create XForms for ODK Collect.",
long_description=open("README.rst", "rt").read(),
install_requires=REQUIRES,
entry_points={
"console_scripts": [
"xls2xform=pyxform.xls2xform:main_cli",
"pyxform_validator_update=pyxform.validators.updater:main_cli",
]
},
)
|
a8f3250bdb3bb2fdb94e930bfe7ffc6409cdde06
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='2.2.0',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 2.2.0",
"raven >= 5.0.0",
]
)
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='1.0.1',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 0.1.0",
"raven >= 5.0.0",
]
)
|
Revert "updated required sentrylogs version"
|
Revert "updated required sentrylogs version"
This reverts commit 86f6fc2fb5a9e3c89088ddc135f66704cff36018.
|
Python
|
mit
|
pulilab/django-sentrylogs
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='2.2.0',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 2.2.0",
"raven >= 5.0.0",
]
)
Revert "updated required sentrylogs version"
This reverts commit 86f6fc2fb5a9e3c89088ddc135f66704cff36018.
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='1.0.1',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 0.1.0",
"raven >= 5.0.0",
]
)
|
<commit_before>import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='2.2.0',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 2.2.0",
"raven >= 5.0.0",
]
)
<commit_msg>Revert "updated required sentrylogs version"
This reverts commit 86f6fc2fb5a9e3c89088ddc135f66704cff36018.<commit_after>
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='1.0.1',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 0.1.0",
"raven >= 5.0.0",
]
)
|
import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='2.2.0',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 2.2.0",
"raven >= 5.0.0",
]
)
Revert "updated required sentrylogs version"
This reverts commit 86f6fc2fb5a9e3c89088ddc135f66704cff36018.import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='1.0.1',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 0.1.0",
"raven >= 5.0.0",
]
)
|
<commit_before>import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='2.2.0',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 2.2.0",
"raven >= 5.0.0",
]
)
<commit_msg>Revert "updated required sentrylogs version"
This reverts commit 86f6fc2fb5a9e3c89088ddc135f66704cff36018.<commit_after>import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='django-sentrylogs',
version='1.0.1',
author='<Include Your Name Here>',
author_email='<Include Your Email Here>',
packages=find_packages(),
include_package_data=True,
url='https://github.com/pulilab/django-sentrylogs',
license='MIT',
description='A django command to run sentrylogs easily',
classifiers=[
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
],
long_description=read_file('README.rst'),
test_suite="runtests.runtests",
zip_safe=False,
install_requires=[
"Django >= 1.4",
"SentryLogs >= 0.1.0",
"raven >= 5.0.0",
]
)
|
9d8fec118b980956e1e04d061bee9b163fc28ae4
|
setup.py
|
setup.py
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
Set x-Bit and add she-bang line
|
Set x-Bit and add she-bang line
|
Python
|
apache-2.0
|
SUSE/azurectl,SUSE/azurectl,SUSE/azurectl
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
Set x-Bit and add she-bang line
|
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
<commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
<commit_msg>Set x-Bit and add she-bang line<commit_after>
|
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
Set x-Bit and add she-bang line#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
<commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
<commit_msg>Set x-Bit and add she-bang line<commit_after>#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt~=0.6.2',
'APScheduler~=3.0.2',
'pyliblzma~=0.5.3',
'azure_storage~=0.20.0',
'azure_servicemanagement_legacy~=0.20.1',
'python-dateutil~=2.4',
'dnspython~=1.12.0',
'setuptools~=5.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
512984cbb8a8e93633ffb7b75b56582e1efeb5bc
|
setup.py
|
setup.py
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = """\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms', 'PyVEP']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points="""\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
Add a dependency to PyVEP.
|
Add a dependency to PyVEP.
|
Python
|
mpl-2.0
|
mozilla-services/tokenserver,mozilla-services/tokenserver,mostlygeek/tokenserver,mostlygeek/tokenserver
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = """\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
Add a dependency to PyVEP.
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms', 'PyVEP']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points="""\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = """\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
<commit_msg>Add a dependency to PyVEP.<commit_after>
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms', 'PyVEP']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points="""\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = """\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
Add a dependency to PyVEP.# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms', 'PyVEP']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points="""\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = """\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
<commit_msg>Add a dependency to PyVEP.<commit_after># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
requires = ['cornice', 'mozsvc', 'powerhose', 'circus', 'wimms', 'PyVEP']
setup(name='tokenserver',
version='0.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points="""\
[paste.app_factory]
main = tokenserver:main
""",
install_requires=requires,
tests_require=requires,
test_suite='tokenserver.tests')
|
1704dc7eef9571b6ac2f0066dbdfe3e8e63dcfbb
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.3',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.4',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
Update the version to 0.2.4
|
Update the version to 0.2.4
|
Python
|
apache-2.0
|
burmanm/rhq-metrics-python-client
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.3',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
Update the version to 0.2.4
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.4',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
<commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.3',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
<commit_msg>Update the version to 0.2.4<commit_after>
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.4',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.3',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
Update the version to 0.2.4#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.4',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
<commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.3',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
<commit_msg>Update the version to 0.2.4<commit_after>#!/usr/bin/env python
from distutils.core import setup
setup(name='rhq-metrics-python-client',
version='0.2.4',
description='Python client to communicate with Hawkular Metrics over HTTP',
author='Michael Burman',
author_email='miburman@redhat.com',
url='http://github.com/burmanm/rhq-metrics-python-client',
packages=['rhqmetrics']
)
|
535d148381ba530d28630bf224d5646f898fde42
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.2.1',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.3.4',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
Fix link to the tagged release.
|
Fix link to the tagged release.
|
Python
|
mit
|
pwcazenave/PyFVCOM
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.2.1',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
Fix link to the tagged release.
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.3.4',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
<commit_before>from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.2.1',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
<commit_msg>Fix link to the tagged release.<commit_after>
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.3.4',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.2.1',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
Fix link to the tagged release.from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.3.4',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
<commit_before>from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.2.1',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
<commit_msg>Fix link to the tagged release.<commit_after>from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '1.3.4',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email = 'pica@pml.ac.uk',
url = 'https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/PyFVCOM',
download_url = 'http://gitlab.em.pml.ac.uk/fvcom/PyFVCOM/repository/archive.tar.gz?ref=1.3.4',
keywords = ['fvcom', 'unstructured grid', 'mesh'],
license = 'MIT',
platforms = 'any',
install_requires = ['pyshp', 'jdcal', 'scipy', 'numpy', 'matplotlib', 'netCDF4', 'lxml', 'matplotlib'],
classifiers = []
)
|
f84586b3693fdc020681fc2dafa9794efab1d79d
|
setup.py
|
setup.py
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451@laposte.net',
maintainer='montag451',
maintainer_email='montag451@laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
Use real mail address to make PyPi happy
|
Use real mail address to make PyPi happy
|
Python
|
mit
|
montag451/pytun,montag451/pytun
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
Use real mail address to make PyPi happy
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451@laposte.net',
maintainer='montag451',
maintainer_email='montag451@laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
<commit_before>from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
<commit_msg>Use real mail address to make PyPi happy<commit_after>
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451@laposte.net',
maintainer='montag451',
maintainer_email='montag451@laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
Use real mail address to make PyPi happyfrom setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451@laposte.net',
maintainer='montag451',
maintainer_email='montag451@laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
<commit_before>from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451 at laposte.net',
maintainer='montag451',
maintainer_email='montag451 at laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
<commit_msg>Use real mail address to make PyPi happy<commit_after>from setuptools import setup, Extension
setup(name='python-pytun',
author='montag451',
author_email='montag451@laposte.net',
maintainer='montag451',
maintainer_email='montag451@laposte.net',
url='https://github.com/montag451/pytun',
description='Linux TUN/TAP wrapper for Python',
long_description=open('README.rst').read(),
version='2.3.0',
ext_modules=[Extension('pytun', ['pytun.c'])],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'])
|
86cea8ad725aa38465c1dfd14c9dcaa0584d89a9
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
],
)
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Development Status :: 4 - Beta',
],
)
|
Add more Python 3 classifiers
|
Add more Python 3 classifiers
|
Python
|
bsd-3-clause
|
dmtucker/keysmith
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
],
)
Add more Python 3 classifiers
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Development Status :: 4 - Beta',
],
)
|
<commit_before>#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
],
)
<commit_msg>Add more Python 3 classifiers<commit_after>
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Development Status :: 4 - Beta',
],
)
|
#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
],
)
Add more Python 3 classifiers#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Development Status :: 4 - Beta',
],
)
|
<commit_before>#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
],
)
<commit_msg>Add more Python 3 classifiers<commit_after>#!/usr/bin/env python
# coding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
import keysmith
with open('README.rst') as readme_file:
README = readme_file.read()
setup(
name='keysmith',
version=keysmith.__version__,
description=keysmith.__doc__,
long_description=README,
author='David Tucker',
author_email='david.michael.tucker@gmail.com',
license='LGPLv2+',
url='https://github.com/dmtucker/keysmith',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
include_package_data=True,
entry_points={'console_scripts': ['keysmith = keysmith.__main__:main']},
keywords='password generator keygen',
classifiers=[
'License :: OSI Approved :: '
'GNU Lesser General Public License v2 or later (LGPLv2+)',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Development Status :: 4 - Beta',
],
)
|
fae955d0e1f1262e086c6ae7e7c69d0961f566e6
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
Add support mention of Python 3.6
|
Add support mention of Python 3.6
|
Python
|
mit
|
redodo/tortilla
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
Add support mention of Python 3.6
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
<commit_before># -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
<commit_msg>Add support mention of Python 3.6<commit_after>
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
Add support mention of Python 3.6# -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
<commit_before># -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
<commit_msg>Add support mention of Python 3.6<commit_after># -*- coding: utf-8 -*-
from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='tortilla',
version='0.4.3',
description='A tiny library for creating wrappers around web APIs',
long_description=long_description,
url='https://github.com/redodo/tortilla',
author='Hidde Bultsma',
author_email='me@redodo.io',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
],
keywords='api wrapper',
packages=['tortilla'],
install_requires=[
'colorama',
'requests',
'formats',
'six',
'httpretty'
],
)
|
df30014188ce06e40425137ee1b46a1bf7a2eb21
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
version = '0.2.2',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
Bump up version to 0.2.2
|
Bump up version to 0.2.2
|
Python
|
mit
|
ishikota/PyPokerEngine
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
Bump up version to 0.2.2
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
version = '0.2.2',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
<commit_before>from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
<commit_msg>Bump up version to 0.2.2<commit_after>
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
version = '0.2.2',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
Bump up version to 0.2.2from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
version = '0.2.2',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
<commit_before>from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
<commit_msg>Bump up version to 0.2.2<commit_after>from setuptools import setup, find_packages
setup(
name = 'PyPokerEngine',
version = '1.0.0',
version = '0.2.2',
author = 'ishikota',
author_email = 'ishikota086@gmail.com',
description = 'Poker engine for poker AI development in Python ',
license = 'MIT',
keywords = 'python poker emgine ai',
url = 'https://github.com/ishikota/PyPokerEngine',
packages = [pkg for pkg in find_packages() if pkg != "tests"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
],
)
|
8665f94ecb2805dcb861e4d7e75629cd975f4a6c
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1', 'modules/core/windows/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
Make sure Windows modules are installed.
|
Make sure Windows modules are installed.
|
Python
|
mit
|
thaim/ansible,thaim/ansible
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
Make sure Windows modules are installed.
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1', 'modules/core/windows/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
<commit_before>#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
<commit_msg>Make sure Windows modules are installed.<commit_after>
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1', 'modules/core/windows/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
Make sure Windows modules are installed.#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1', 'modules/core/windows/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
<commit_before>#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
<commit_msg>Make sure Windows modules are installed.<commit_after>#!/usr/bin/env python
import os
import sys
from glob import glob
sys.path.insert(0, os.path.abspath('lib'))
from ansible import __version__, __author__
try:
from setuptools import setup, find_packages
except ImportError:
print "Ansible now needs setuptools in order to build. " \
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
sys.exit(1)
setup(name='ansible',
version=__version__,
description='Radically simple IT automation',
author=__author__,
author_email='michael@ansible.com',
url='http://ansible.com/',
license='GPLv3',
install_requires=['paramiko', 'jinja2', "PyYAML", 'setuptools', 'pycrypto >= 2.6'],
package_dir={ 'ansible': 'lib/ansible' },
packages=find_packages('lib'),
package_data={
'': ['module_utils/*.ps1', 'modules/core/windows/*.ps1'],
},
scripts=[
'bin/ansible',
'bin/ansible-playbook',
'bin/ansible-pull',
'bin/ansible-doc',
'bin/ansible-galaxy',
'bin/ansible-vault',
],
data_files=[],
)
|
5e502eeb35e4a8f778b4974e4934b2414a2018a5
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.0'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.1'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
Add manifest and bump version
|
Add manifest and bump version
|
Python
|
mit
|
ampedandwired/bottle-swagger
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.0'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
Add manifest and bump version
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.1'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
<commit_before>#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.0'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
<commit_msg>Add manifest and bump version<commit_after>
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.1'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.0'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
Add manifest and bump version#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.1'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
<commit_before>#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.0'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
<commit_msg>Add manifest and bump version<commit_after>#!/usr/bin/env python
import os
from setuptools import setup
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '1.0.1'
setup(
name='bottle-swagger',
version=VERSION,
url='https://github.com/ampedandwired/bottle-swagger',
download_url='https://github.com/ampedandwired/bottle-swagger/archive/v{}.tar.gz'.format(VERSION),
description='Swagger integration for Bottle',
author='Charles Blaxland',
author_email='charles.blaxland@gmail.com',
license='MIT',
platforms='any',
py_modules=['bottle_swagger'],
install_requires=REQUIREMENTS,
classifiers=[
'Environment :: Web Environment',
'Environment :: Plugins',
'Framework :: Bottle',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
f2adf811b5f3c2da5388a1d2adff0033b285d840
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
dependency_links=[
'git+https://github.com/ProjetPP/PPP-datamodel-Python.git',
],
packages=[
'ppp_core',
],
)
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
packages=[
'ppp_core',
],
)
|
Remove dependency_links as it seems to be ignored.
|
Remove dependency_links as it seems to be ignored.
I also added ppp_datamodel to Pypi so it is not needed anymore.
|
Python
|
agpl-3.0
|
ProjetPP/PPP-libmodule-Python,ProjetPP/PPP-Core,ProjetPP/PPP-Core,ProjetPP/PPP-libmodule-Python
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
dependency_links=[
'git+https://github.com/ProjetPP/PPP-datamodel-Python.git',
],
packages=[
'ppp_core',
],
)
Remove dependency_links as it seems to be ignored.
I also added ppp_datamodel to Pypi so it is not needed anymore.
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
packages=[
'ppp_core',
],
)
|
<commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
dependency_links=[
'git+https://github.com/ProjetPP/PPP-datamodel-Python.git',
],
packages=[
'ppp_core',
],
)
<commit_msg>Remove dependency_links as it seems to be ignored.
I also added ppp_datamodel to Pypi so it is not needed anymore.<commit_after>
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
packages=[
'ppp_core',
],
)
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
dependency_links=[
'git+https://github.com/ProjetPP/PPP-datamodel-Python.git',
],
packages=[
'ppp_core',
],
)
Remove dependency_links as it seems to be ignored.
I also added ppp_datamodel to Pypi so it is not needed anymore.#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
packages=[
'ppp_core',
],
)
|
<commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
dependency_links=[
'git+https://github.com/ProjetPP/PPP-datamodel-Python.git',
],
packages=[
'ppp_core',
],
)
<commit_msg>Remove dependency_links as it seems to be ignored.
I also added ppp_datamodel to Pypi so it is not needed anymore.<commit_after>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_core',
version='0.1',
description='Core/router of the PPP framework',
url='https://github.com/ProjetPP/PPP-Core',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
install_requires=[
'requests',
'ppp_datamodel',
],
packages=[
'ppp_core',
],
)
|
5c7466b8b68e064e778197b516bb8b24829605a2
|
setup.py
|
setup.py
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="TODO",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="One step buildout build.",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta'
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Build Tools',
],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='http://github.com/nens/nensbuild',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
Add clasifiers and short description.
|
Add clasifiers and short description.
|
Python
|
bsd-2-clause
|
nens/nensbuild
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="TODO",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
Add clasifiers and short description.
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="One step buildout build.",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta'
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Build Tools',
],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='http://github.com/nens/nensbuild',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
<commit_before>from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="TODO",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
<commit_msg>Add clasifiers and short description.<commit_after>
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="One step buildout build.",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta'
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Build Tools',
],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='http://github.com/nens/nensbuild',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="TODO",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
Add clasifiers and short description.from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="One step buildout build.",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta'
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Build Tools',
],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='http://github.com/nens/nensbuild',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
<commit_before>from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="TODO",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
<commit_msg>Add clasifiers and short description.<commit_after>from setuptools import setup
version = '0.1dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
],
tests_require = [
'mock',
]
setup(name='nensbuild',
version=version,
description="One step buildout build.",
long_description=long_description,
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta'
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Build Tools',
],
keywords=[],
author='Roland van Laar',
author_email='roland.vanlaar@nelen-schuurmans.nl',
url='http://github.com/nens/nensbuild',
license='BSD',
packages=['nensbuild'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
entry_points={
'console_scripts': [
'nensbuild = nensbuild.build:main',
]},
)
|
5a78f5a49f868aa8033bc297b5ebf04825691efd
|
setup.py
|
setup.py
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai', 'ecoapi', 'xapi'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
Add packages for ecoapi e xapi
|
Add packages for ecoapi e xapi
|
Python
|
agpl-3.0
|
marcore/pok-eco,marcore/pok-eco
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
Add packages for ecoapi e xapi
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai', 'ecoapi', 'xapi'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
<commit_before>#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
<commit_msg>Add packages for ecoapi e xapi<commit_after>
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai', 'ecoapi', 'xapi'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
Add packages for ecoapi e xapi#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai', 'ecoapi', 'xapi'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
<commit_before>#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
<commit_msg>Add packages for ecoapi e xapi<commit_after>#!/usr/bin/env python
""" Setup to allow pip installs of pok-eco module """
from setuptools import setup
setup(
name='pok-eco',
version='0.1.0',
description='POK-ECO Integrations ',
author='METID - Politecnico di Milano',
url='http://www.metid.polimi.it',
license='AGPL',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=['oai', 'ecoapi', 'xapi'],
dependency_links=["https://github.com/infrae/pyoai/archive/2.4.4.zip#egg=pyoai==2.4.4"],
install_requires=[
"Django >= 1.4, < 1.5",
"django-celery==3.1.16"
]
)
|
47bac77f72477df041fa8cb26fed8f1ff2458c3d
|
setup.py
|
setup.py
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4'
],
)
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4',
'lxml'
],
)
|
Add lxml to list of install_requires
|
Add lxml to list of install_requires
This is literally the exact same thing as #19, but for some reason, that fix isn't included
|
Python
|
mit
|
Utagai/spice
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4'
],
)
Add lxml to list of install_requires
This is literally the exact same thing as #19, but for some reason, that fix isn't included
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4',
'lxml'
],
)
|
<commit_before>from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4'
],
)
<commit_msg>Add lxml to list of install_requires
This is literally the exact same thing as #19, but for some reason, that fix isn't included<commit_after>
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4',
'lxml'
],
)
|
from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4'
],
)
Add lxml to list of install_requires
This is literally the exact same thing as #19, but for some reason, that fix isn't includedfrom distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4',
'lxml'
],
)
|
<commit_before>from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4'
],
)
<commit_msg>Add lxml to list of install_requires
This is literally the exact same thing as #19, but for some reason, that fix isn't included<commit_after>from distutils.core import setup
from setuptools import setup
setup(
name = 'spice_api',
packages = ['spice_api'], # this must be the same as the name above
version = '1.0.4',
description = 'spice is a pure Python API that wraps around MALs Official API and makes it much better.',
long_description = open('README.md').read(),
license = 'MIT',
author = 'Mehrab Hoque',
author_email = 'mehrabhoque@gmail.com',
url = 'https://github.com/Utagai/spice', # use the URL to the github repo
classifiers = [
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords = ['spice', 'MyAnimeList', 'API'], # arbitrary keywords
install_requires = [
'requests',
'beautifulsoup4',
'lxml'
],
)
|
1e76ed0df800d359d4a137e8a3dc8c79b2b2ef79
|
setup.py
|
setup.py
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.0.4',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.1.0',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
Increment to minor version 1.1.0
|
Increment to minor version 1.1.0
|
Python
|
mit
|
spgill/bitnigma
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.0.4',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
Increment to minor version 1.1.0
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.1.0',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
<commit_before>import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.0.4',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
<commit_msg>Increment to minor version 1.1.0<commit_after>
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.1.0',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.0.4',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
Increment to minor version 1.1.0import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.1.0',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
<commit_before>import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.0.4',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
<commit_msg>Increment to minor version 1.1.0<commit_after>import os
import setuptools
def readme():
if os.path.isfile('README.md'):
try:
import requests
r = requests.post(
url='http://c.docverter.com/convert',
data={'from': 'markdown', 'to': 'rst'},
files={'input_files[]': open('README.md', 'r')}
)
if r.ok:
return r.content.decode()
else:
return 'ERROR CONVERTING README!'
except ImportError:
print('No `requests` module. No readme conversion applied.')
return '!!NO CONVERSION!!\n\n' + open('README.md', 'r').read()
else:
return 'No readme for local builds.'
setuptools.setup(
name='bitnigma',
version='1.1.0',
description='Python byte-enabled Enigma-like simulation.',
long_description=readme(),
keywords='enigma machine encrypt encryption rotor rotors',
author='Samuel P. Gillispie II',
author_email='spgill@vt.edu',
url='https://github.com/spgill/bitnigma',
license='MIT',
packages=['bitnigma'],
install_requires=[],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
]
)
|
c72158905c0a684c2faded4cccef789c9ead64e0
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.10.2',
]
)
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.11.0',
]
)
|
Bump statsmodels from 0.10.2 to 0.11.0
|
Bump statsmodels from 0.10.2 to 0.11.0
Bumps [statsmodels](https://github.com/statsmodels/statsmodels) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/statsmodels/statsmodels/releases)
- [Changelog](https://github.com/statsmodels/statsmodels/blob/master/CHANGES.md)
- [Commits](https://github.com/statsmodels/statsmodels/compare/v0.10.2...v0.11.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
Python
|
apache-2.0
|
bugra/l1
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.10.2',
]
)
Bump statsmodels from 0.10.2 to 0.11.0
Bumps [statsmodels](https://github.com/statsmodels/statsmodels) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/statsmodels/statsmodels/releases)
- [Changelog](https://github.com/statsmodels/statsmodels/blob/master/CHANGES.md)
- [Commits](https://github.com/statsmodels/statsmodels/compare/v0.10.2...v0.11.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.11.0',
]
)
|
<commit_before>#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.10.2',
]
)
<commit_msg>Bump statsmodels from 0.10.2 to 0.11.0
Bumps [statsmodels](https://github.com/statsmodels/statsmodels) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/statsmodels/statsmodels/releases)
- [Changelog](https://github.com/statsmodels/statsmodels/blob/master/CHANGES.md)
- [Commits](https://github.com/statsmodels/statsmodels/compare/v0.10.2...v0.11.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com><commit_after>
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.11.0',
]
)
|
#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.10.2',
]
)
Bump statsmodels from 0.10.2 to 0.11.0
Bumps [statsmodels](https://github.com/statsmodels/statsmodels) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/statsmodels/statsmodels/releases)
- [Changelog](https://github.com/statsmodels/statsmodels/blob/master/CHANGES.md)
- [Commits](https://github.com/statsmodels/statsmodels/compare/v0.10.2...v0.11.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.11.0',
]
)
|
<commit_before>#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.10.2',
]
)
<commit_msg>Bump statsmodels from 0.10.2 to 0.11.0
Bumps [statsmodels](https://github.com/statsmodels/statsmodels) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/statsmodels/statsmodels/releases)
- [Changelog](https://github.com/statsmodels/statsmodels/blob/master/CHANGES.md)
- [Commits](https://github.com/statsmodels/statsmodels/compare/v0.10.2...v0.11.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com><commit_after>#!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==0.25.3',
'cvxopt==1.2.4',
'statsmodels==0.11.0',
]
)
|
f933b5c989f53654003f10d334115ff57b825a1f
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='snactor',
version='0.1',
packages=['snactor'],
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
from distutils.core import setup
from setuptools import find_packages
setup(
name='snactor',
version='0.1',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
Make sure all submodules are installed
|
Make sure all submodules are installed
|
Python
|
apache-2.0
|
leapp-to/snactor
|
from distutils.core import setup
setup(
name='snactor',
version='0.1',
packages=['snactor'],
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
Make sure all submodules are installed
|
from distutils.core import setup
from setuptools import find_packages
setup(
name='snactor',
version='0.1',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
<commit_before>from distutils.core import setup
setup(
name='snactor',
version='0.1',
packages=['snactor'],
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
<commit_msg>Make sure all submodules are installed<commit_after>
|
from distutils.core import setup
from setuptools import find_packages
setup(
name='snactor',
version='0.1',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
from distutils.core import setup
setup(
name='snactor',
version='0.1',
packages=['snactor'],
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
Make sure all submodules are installedfrom distutils.core import setup
from setuptools import find_packages
setup(
name='snactor',
version='0.1',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
<commit_before>from distutils.core import setup
setup(
name='snactor',
version='0.1',
packages=['snactor'],
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
<commit_msg>Make sure all submodules are installed<commit_after>from distutils.core import setup
from setuptools import find_packages
setup(
name='snactor',
version='0.1',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
url='https://github.com/leapp-to/snactor',
license='ASL 2.0',
author="Vinzenz 'evilissimo' Feenstra",
author_email='evilissimo@redhat.com',
description='snactor is a python library for actors',
requires=['PyYAML', 'jsl']
)
|
9c99da5b8187f8af8cc3008ba06f2e6ece34010d
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax==1.4.11",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax>=1.5.0",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
Update pyrax, and make it stop reverting if the version is too new
|
Update pyrax, and make it stop reverting if the version is too new
|
Python
|
bsd-3-clause
|
SmithsonianEnterprises/django-cumulus,SmithsonianEnterprises/django-cumulus
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax==1.4.11",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
Update pyrax, and make it stop reverting if the version is too new
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax>=1.5.0",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
<commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax==1.4.11",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
<commit_msg>Update pyrax, and make it stop reverting if the version is too new<commit_after>
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax>=1.5.0",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax==1.4.11",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
Update pyrax, and make it stop reverting if the version is too new#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax>=1.5.0",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
<commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax==1.4.11",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
<commit_msg>Update pyrax, and make it stop reverting if the version is too new<commit_after>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
# Use the docstring of the __init__ file to be the description
short_description = " ".join(__import__("cumulus").__doc__.splitlines()).strip()
# Use part of the sphinx docs index for the long description
doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.rst")
long_description = open(index_filename).read().split("split here", 1)[1]
setup(
name="django-cumulus",
version=__import__("cumulus").get_version().replace(" ", "-"),
packages=find_packages(),
install_requires=[
"pyrax>=1.5.0",
],
author="Rich Leland",
author_email="rich@richleland.com",
license="BSD",
description=short_description,
long_description=long_description,
url="https://github.com/richleland/django-cumulus/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
)
|
fa5547f49691ff46e3cf8301afa5ab61955f0456
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'pygooglechart',
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
Add pygooglechart to the requirements
|
Add pygooglechart to the requirements
|
Python
|
bsd-3-clause
|
dirtycoder/opbeat_python,daevaorn/sentry,WoLpH/django-sentry,argonemyth/sentry,nicholasserra/sentry,llonchj/sentry,vperron/sentry,jean/sentry,Goldmund-Wyldebeast-Wunderliebe/raven-python,zenefits/sentry,SilentCircle/sentry,felixbuenemann/sentry,ronaldevers/raven-python,jmagnusson/raven-python,NickPresta/sentry,ewdurbin/raven-python,mvaled/sentry,fotinakis/sentry,argonemyth/sentry,smarkets/raven-python,dcramer/sentry-old,mitsuhiko/sentry,ronaldevers/raven-python,ewdurbin/sentry,tarkatronic/opbeat_python,wujuguang/sentry,TedaLIEz/sentry,patrys/opbeat_python,mvaled/sentry,kevinastone/sentry,tbarbugli/sentry_fork,beniwohli/apm-agent-python,alexm92/sentry,gencer/sentry,jmp0xf/raven-python,Kronuz/django-sentry,lepture/raven-python,rdio/sentry,ticosax/opbeat_python,argonemyth/sentry,Kryz/sentry,zenefits/sentry,gencer/sentry,jmp0xf/raven-python,gencer/sentry,tarkatronic/opbeat_python,alex/raven,ngonzalvez/sentry,dbravender/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,johansteffner/raven-python,mitsuhiko/raven,JamesMura/sentry,primepix/django-sentry,korealerts1/sentry,NickPresta/sentry,percipient/raven-python,hongliang5623/sentry,beni55/sentry,pauloschilling/sentry,smarkets/raven-python,JackDanger/sentry,songyi199111/sentry,icereval/raven-python,hongliang5623/sentry,llonchj/sentry,JamesMura/sentry,beni55/sentry,llonchj/sentry,1tush/sentry,lepture/raven-python,recht/raven-python,danriti/raven-python,daevaorn/sentry,tbarbugli/sentry_fork,daevaorn/sentry,gencer/sentry,dbravender/raven-python,nikolas/raven-python,imankulov/sentry,NickPresta/sentry,songyi199111/sentry,beniwohli/apm-agent-python,getsentry/raven-python,ticosax/opbeat_python,zenefits/sentry,rdio/sentry,inspirehep/raven-python,Photonomie/raven-python,ewdurbin/sentry,primepix/django-sentry,getsentry/raven-python,boneyao/sentry,jean/sentry,johansteffner/raven-python,ewdurbin/sentry,nikolas/raven-python,someonehan/raven-python,mvaled/sentry,drcapulet/sentry,daevaorn/sentry,wong2/sentry,jbarbuto/raven-python,rdio/sentry,hongliang5623/sentry,JamesMura/sentry,icereval/raven-python,camilonova/sentry,drcapulet/sentry,BayanGroup/sentry,kevinlondon/sentry,arthurlogilab/raven-python,wong2/sentry,JTCunning/sentry,getsentry/raven-python,someonehan/raven-python,primepix/django-sentry,dcramer/sentry-old,openlabs/raven,patrys/opbeat_python,looker/sentry,mitsuhiko/sentry,looker/sentry,akalipetis/raven-python,WoLpH/django-sentry,SilentCircle/sentry,akheron/raven-python,BuildingLink/sentry,looker/sentry,percipient/raven-python,beniwohli/apm-agent-python,Kryz/sentry,jokey2k/sentry,jmagnusson/raven-python,nikolas/raven-python,imankulov/sentry,boneyao/sentry,hzy/raven-python,Natim/sentry,someonehan/raven-python,TedaLIEz/sentry,Kryz/sentry,BuildingLink/sentry,Goldmund-Wyldebeast-Wunderliebe/raven-python,NickPresta/sentry,camilonova/sentry,JTCunning/sentry,1tush/sentry,ronaldevers/raven-python,fuziontech/sentry,alexm92/sentry,SilentCircle/sentry,Photonomie/raven-python,percipient/raven-python,Photonomie/raven-python,fotinakis/sentry,BuildingLink/sentry,gencer/sentry,JamesMura/sentry,JamesMura/sentry,smarkets/raven-python,looker/sentry,icereval/raven-python,BayanGroup/sentry,ifduyue/sentry,JackDanger/sentry,inspirehep/raven-python,chayapan/django-sentry,jokey2k/sentry,recht/raven-python,rdio/sentry,icereval/raven-python,jmp0xf/raven-python,wong2/sentry,felixbuenemann/sentry,gg7/sentry,recht/raven-python,jean/sentry,pauloschilling/sentry,alex/sentry,TedaLIEz/sentry,fuziontech/sentry,mitsuhiko/raven,akheron/raven-python,arthurlogilab/raven-python,BuildingLink/sentry,zenefits/sentry,felixbuenemann/sentry,korealerts1/sentry,BayanGroup/sentry,dbravender/raven-python,JTCunning/sentry,mvaled/sentry,danriti/raven-python,SilentCircle/sentry,dirtycoder/opbeat_python,fotinakis/sentry,korealerts1/sentry,mvaled/sentry,hzy/raven-python,patrys/opbeat_python,beeftornado/sentry,gg7/sentry,akalipetis/raven-python,pauloschilling/sentry,arthurlogilab/raven-python,ifduyue/sentry,nicholasserra/sentry,hzy/raven-python,collective/mr.poe,lopter/raven-python-old,daikeren/opbeat_python,nikolas/raven-python,Kronuz/django-sentry,beeftornado/sentry,ewdurbin/raven-python,ticosax/opbeat_python,jmagnusson/raven-python,kevinlondon/sentry,inspirehep/raven-python,tarkatronic/opbeat_python,jean/sentry,zenefits/sentry,dcramer/sentry-old,drcapulet/sentry,alexm92/sentry,ifduyue/sentry,daikeren/opbeat_python,johansteffner/raven-python,smarkets/raven-python,akheron/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,gg7/sentry,imankulov/sentry,alex/sentry,chayapan/django-sentry,camilonova/sentry,patrys/opbeat_python,nicholasserra/sentry,mvaled/sentry,ewdurbin/raven-python,Natim/sentry,ngonzalvez/sentry,jean/sentry,kevinastone/sentry,jbarbuto/raven-python,beniwohli/apm-agent-python,1tush/sentry,jbarbuto/raven-python,dirtycoder/opbeat_python,ifduyue/sentry,daikeren/opbeat_python,jbarbuto/raven-python,danriti/raven-python,JackDanger/sentry,wujuguang/sentry,Natim/sentry,lepture/raven-python,alex/sentry,Kronuz/django-sentry,beeftornado/sentry,fuziontech/sentry,fotinakis/sentry,tbarbugli/sentry_fork,akalipetis/raven-python,songyi199111/sentry,looker/sentry,jokey2k/sentry,kevinastone/sentry,BuildingLink/sentry,chayapan/django-sentry,arthurlogilab/raven-python,ngonzalvez/sentry,kevinlondon/sentry,inspirehep/raven-python,wujuguang/sentry,WoLpH/django-sentry,vperron/sentry,vperron/sentry,boneyao/sentry,beni55/sentry,ifduyue/sentry
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)Add pygooglechart to the requirements
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'pygooglechart',
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
<commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)<commit_msg>Add pygooglechart to the requirements<commit_after>
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'pygooglechart',
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)Add pygooglechart to the requirements#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'pygooglechart',
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
<commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)<commit_msg>Add pygooglechart to the requirements<commit_after>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-sentry',
version='.'.join(map(str, __import__('sentry').__version__)),
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/django-sentry',
description = 'Exception Logging to a Database in Django',
packages=find_packages(),
requirements=[
'pygooglechart',
'django-paging',
'django-indexer',
],
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
|
68135585a907892f339e2ac1af77e92e077b8cb8
|
setup.py
|
setup.py
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
Update the classifier to specify support for Python 3 as well.
|
PYD-5: Update the classifier to specify support for Python 3 as well.
|
Python
|
bsd-3-clause
|
azaghal/pydenticon
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
PYD-5: Update the classifier to specify support for Python 3 as well.
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
<commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
<commit_msg>PYD-5: Update the classifier to specify support for Python 3 as well.<commit_after>
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
PYD-5: Update the classifier to specify support for Python 3 as well.import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
<commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
<commit_msg>PYD-5: Update the classifier to specify support for Python 3 as well.<commit_after>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = ["Pillow"]
TEST_REQUIREMENTS = ["mock"]
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pydenticon',
version='0.2-dev',
packages=['pydenticon'],
include_package_data=True,
license='BSD', # example license
description='Library for generating identicons. Port of Sigil (https://github.com/cupcake/sigil) with enhancements.',
long_description=README,
url='https://github.com/azaghal/pydenticon',
author='Branko Majic',
author_email='branko@majic.rs',
install_requires=INSTALL_REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests",
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries',
],
)
|
ab492f85da0db20edbb883e56f30d07328ec4e4f
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else []
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Quality Assurance',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else [],
entry_points={'console_scripts': ['yasi = yasi:main']}
)
|
Add pip console script entry point
|
Add pip console script entry point
|
Python
|
mit
|
nkmathew/yasi-sexp-indenter,nkmathew/yasi-sexp-indenter
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else []
)
Add pip console script entry point
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Quality Assurance',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else [],
entry_points={'console_scripts': ['yasi = yasi:main']}
)
|
<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else []
)
<commit_msg>Add pip console script entry point<commit_after>
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Quality Assurance',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else [],
entry_points={'console_scripts': ['yasi = yasi:main']}
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else []
)
Add pip console script entry point#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Quality Assurance',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else [],
entry_points={'console_scripts': ['yasi = yasi:main']}
)
|
<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else []
)
<commit_msg>Add pip console script entry point<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Setup for yasi """
import yasi
import sys
import setuptools
setuptools.setup(
name='yasi',
version=yasi.__version__,
description='A dialect aware s-expression indenter',
author='Mathew Ngetich',
author_email='kipkoechmathew@gmail.com',
download_url="https://github.com/nkmathew/yasi-sexp-indenter/zipball/master",
url='https://github.com/nkmathew/yasi-sexp-indenter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Quality Assurance',
],
keywords='lisp, scheme, newlisp, indenter, formatter',
test_suite='test.test_yasi',
py_modules=['yasi'],
install_requires=['argparse'] if sys.version_info < (2, 7) else [],
entry_points={'console_scripts': ['yasi = yasi:main']}
)
|
ea4b8dcf478fad8597b9d3ed38e1de4ce7db2f08
|
setup.py
|
setup.py
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.11',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.12',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
Use pysqlite2 when sqlite3 is not available
|
Use pysqlite2 when sqlite3 is not available
|
Python
|
apache-2.0
|
ellert/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,gridcf/gct,globus/globus-toolkit,ellert/globus-toolkit,gridcf/gct,globus/globus-toolkit,gridcf/gct,globus/globus-toolkit,ellert/globus-toolkit,gridcf/gct,ellert/globus-toolkit,ellert/globus-toolkit,gridcf/gct,gridcf/gct
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.11',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
Use pysqlite2 when sqlite3 is not available
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.12',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
<commit_before>#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.11',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
<commit_msg>Use pysqlite2 when sqlite3 is not available<commit_after>
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.12',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.11',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
Use pysqlite2 when sqlite3 is not available#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.12',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
<commit_before>#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.11',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
<commit_msg>Use pysqlite2 when sqlite3 is not available<commit_after>#! /usr/bin/python
from distutils.core import setup
setup(name = 'myproxy_oauth',
version = '0.12',
description = 'MyProxy OAuth Delegation Service',
author = 'Globus Toolkit',
author_email = 'support@globus.org',
packages = [
'myproxy',
'myproxyoauth',
'myproxyoauth.templates',
'myproxyoauth.static',
'oauth2'],
package_data = {
'myproxyoauth': [ 'templates/*.html', 'static/*.png', 'static/*.css' ]
},
scripts = [ 'wsgi.py', 'myproxy-oauth-setup' ],
data_files = [
('apache', [
'conf/myproxy-oauth',
'conf/myproxy-oauth-2.4',
'conf/myproxy-oauth-epel5' ])]
)
|
f1da11279ab22a134166bb006d46204ed6e1f4e4
|
setup.py
|
setup.py
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.1',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.2',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
Put the release number to 0.2
|
Put the release number to 0.2
|
Python
|
agpl-3.0
|
kushaldas/autocloud,kushaldas/autocloud,kushaldas/autocloud,kushaldas/autocloud
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.1',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
Put the release number to 0.2
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.2',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
<commit_before>from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.1',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
<commit_msg>Put the release number to 0.2<commit_after>
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.2',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.1',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
Put the release number to 0.2from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.2',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
<commit_before>from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.1',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
<commit_msg>Put the release number to 0.2<commit_after>from setuptools import setup
requires = [
'redis',
'retask',
'fedmsg',
]
setup(
name='autocloud',
version='0.2',
description='',
author='',
author_email='',
url='https://github.com/kushaldas/autocloud',
install_requires=requires,
packages=['autocloud', 'autocloud.web', 'autocloud.utils'],
include_package_data=True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
entry_points={
'moksha.consumer': [
"autocloud_consumer = autocloud.consumer:AutoCloudConsumer",
],
},
)
|
494378256dc5fc6fed290a87afcbcc79b31eb37e
|
linguine/ops/word_cloud_op.py
|
linguine/ops/word_cloud_op.py
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
#sort results by term frequency
results.sort(key=lambda results: results['frequency'], reverse=False)
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
Sort term frequency results by frequency
|
Sort term frequency results by frequency
|
Python
|
mit
|
rigatoni/linguine-python,Pastafarians/linguine-python
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
Sort term frequency results by frequency
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
#sort results by term frequency
results.sort(key=lambda results: results['frequency'], reverse=False)
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
<commit_before>class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
<commit_msg>Sort term frequency results by frequency<commit_after>
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
#sort results by term frequency
results.sort(key=lambda results: results['frequency'], reverse=False)
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
Sort term frequency results by frequencyclass WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
#sort results by term frequency
results.sort(key=lambda results: results['frequency'], reverse=False)
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
<commit_before>class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
<commit_msg>Sort term frequency results by frequency<commit_after>class WordCloudOp:
def run(self, data):
terms = { }
results = [ ]
try:
for corpus in data:
tokens = corpus.tokenized_contents
for token in tokens:
if token in terms:
terms[token]+=1
else:
terms[token]=1
for term in terms:
results.append({ "term" : term, "frequency" : terms[term]})
#sort results by term frequency
results.sort(key=lambda results: results['frequency'], reverse=False)
return results
except LookupError:
raise TransactionException('NLTK \'Punkt\' Model not installed.', 500)
except TypeError:
raise TransactionException('Corpus contents does not exist.')
|
dc934f178c5101e0aad592b55101c36608a2eab9
|
girder/molecules/molecules/utilities/pagination.py
|
girder/molecules/molecules/utilities/pagination.py
|
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', -1)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
from girder.constants import SortDir
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', SortDir.DESCENDING)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
Use SortDir.DESCENDING for default sort direction
|
Use SortDir.DESCENDING for default sort direction
Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>
|
Python
|
bsd-3-clause
|
OpenChemistry/mongochemserver
|
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', -1)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
Use SortDir.DESCENDING for default sort direction
Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>
|
from girder.constants import SortDir
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', SortDir.DESCENDING)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
<commit_before>
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', -1)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
<commit_msg>Use SortDir.DESCENDING for default sort direction
Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com><commit_after>
|
from girder.constants import SortDir
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', SortDir.DESCENDING)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', -1)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
Use SortDir.DESCENDING for default sort direction
Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>from girder.constants import SortDir
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', SortDir.DESCENDING)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
<commit_before>
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', -1)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
<commit_msg>Use SortDir.DESCENDING for default sort direction
Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com><commit_after>from girder.constants import SortDir
def default_pagination_params(limit=None, offset=None, sort=None):
"""Returns default params unless they are set"""
if limit is None:
limit = 25
if offset is None:
offset = 0
if sort is None:
sort = [('_id', SortDir.DESCENDING)]
return limit, offset, sort
def parse_pagination_params(params):
"""Parse params and get (limit, offset, sort)
The defaults will be returned if not found in params.
"""
# Defaults
limit, offset, sort = default_pagination_params()
if params:
if 'limit' in params:
limit = int(params['limit'])
if 'offset' in params:
offset = int(params['offset'])
if 'sort' in params and 'sortdir' in params:
sort = [(params['sort'], int(params['sortdir']))]
return limit, offset, sort
def search_results_dict(results, limit, offset, sort):
"""This is for consistent search results"""
ret = {
'matches': len(results),
'limit': limit,
'offset': offset,
'results': results
}
return ret
|
579ebfda83f3d9ce6add57ccae60e88c874afc9e
|
fickle/api.py
|
fickle/api.py
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['POST'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['PUT'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
Change validate HTTP method to PUT
|
Change validate HTTP method to PUT
|
Python
|
mit
|
norbert/fickle
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['POST'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
Change validate HTTP method to PUT
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['PUT'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
<commit_before>import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['POST'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
<commit_msg>Change validate HTTP method to PUT<commit_after>
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['PUT'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['POST'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
Change validate HTTP method to PUTimport flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['PUT'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
<commit_before>import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['POST'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
<commit_msg>Change validate HTTP method to PUT<commit_after>import flask
from flask import request, json
def Response(data, status = 200):
body = json.dumps(data)
return flask.Response(body, status = status, mimetype = 'application/json')
def SuccessResponse(dataset_id = None):
return Response({ 'success': True, 'id': dataset_id })
def ErrorResponse(status = 400):
return Response({ 'success': False }, status = status)
def API(name, backend):
app = flask.Flask(name)
app.config.from_object(name)
@app.route('/')
def api_root():
return SuccessResponse(backend.dataset_id)
@app.route('/load', methods=['POST'])
def api_load():
backend.load(request.json)
return SuccessResponse(backend.dataset_id)
@app.route('/fit', methods=['POST'])
def api_fit():
if not backend.loaded():
return ErrorResponse()
backend.fit()
return SuccessResponse(backend.dataset_id)
@app.route('/validate', methods=['PUT'])
def api_validate():
if not backend.loaded():
return ErrorResponse()
data = backend.validate()
return Response(data)
@app.route('/predict', methods=['PUT'])
def api_predict():
if not backend.trained():
return ErrorResponse()
data = backend.predict(request.json).tolist()
return Response(data)
return app
|
e8191f4f4be442ad689918e4cbc0c188e874db6f
|
pyleus/compat.py
|
pyleus/compat.py
|
import sys
if sys.version_info.major < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
import sys
if sys.version_info[0] < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
Fix sys.version_info lookup for python 2
|
Fix sys.version_info lookup for python 2
|
Python
|
apache-2.0
|
patricklucas/pyleus,dapuck/pyleus,mzbyszynski/pyleus,imcom/pyleus,jirafe/pyleus,imcom/pyleus,Yelp/pyleus,stallman-cui/pyleus,poros/pyleus,mzbyszynski/pyleus,Yelp/pyleus,dapuck/pyleus,patricklucas/pyleus,jirafe/pyleus,poros/pyleus,imcom/pyleus,ecanzonieri/pyleus,stallman-cui/pyleus,ecanzonieri/pyleus
|
import sys
if sys.version_info.major < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
Fix sys.version_info lookup for python 2
|
import sys
if sys.version_info[0] < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
<commit_before>import sys
if sys.version_info.major < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
<commit_msg>Fix sys.version_info lookup for python 2<commit_after>
|
import sys
if sys.version_info[0] < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
import sys
if sys.version_info.major < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
Fix sys.version_info lookup for python 2import sys
if sys.version_info[0] < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
<commit_before>import sys
if sys.version_info.major < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
<commit_msg>Fix sys.version_info lookup for python 2<commit_after>import sys
if sys.version_info[0] < 3:
from cStringIO import StringIO
BytesIO = StringIO
else:
from io import BytesIO
from io import StringIO
_ = BytesIO
_ = StringIO
|
d29c28bb51acb388e3ea855dfa1fcc3c4fc0ff74
|
assess_model_change_watcher.py
|
assess_model_change_watcher.py
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client):
# Deploy charms, there are several under ./repository
client.deploy('dummy-source')
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client)
return 0
if __name__ == '__main__':
sys.exit(main())
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from jujucharm import local_charm_path
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client, charm_series):
# Deploy charms, there are several under ./repository
charm = local_charm_path(charm='dummy-source', juju_ver=client.version,
series=charm_series, platform='ubuntu')
client.deploy(charm)
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client, bs_manager.series)
return 0
if __name__ == '__main__':
sys.exit(main())
|
Use Juju 2 compatible deploy.
|
Use Juju 2 compatible deploy.
|
Python
|
agpl-3.0
|
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client):
# Deploy charms, there are several under ./repository
client.deploy('dummy-source')
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client)
return 0
if __name__ == '__main__':
sys.exit(main())
Use Juju 2 compatible deploy.
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from jujucharm import local_charm_path
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client, charm_series):
# Deploy charms, there are several under ./repository
charm = local_charm_path(charm='dummy-source', juju_ver=client.version,
series=charm_series, platform='ubuntu')
client.deploy(charm)
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client, bs_manager.series)
return 0
if __name__ == '__main__':
sys.exit(main())
|
<commit_before>#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client):
# Deploy charms, there are several under ./repository
client.deploy('dummy-source')
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client)
return 0
if __name__ == '__main__':
sys.exit(main())
<commit_msg>Use Juju 2 compatible deploy.<commit_after>
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from jujucharm import local_charm_path
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client, charm_series):
# Deploy charms, there are several under ./repository
charm = local_charm_path(charm='dummy-source', juju_ver=client.version,
series=charm_series, platform='ubuntu')
client.deploy(charm)
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client, bs_manager.series)
return 0
if __name__ == '__main__':
sys.exit(main())
|
#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client):
# Deploy charms, there are several under ./repository
client.deploy('dummy-source')
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client)
return 0
if __name__ == '__main__':
sys.exit(main())
Use Juju 2 compatible deploy.#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from jujucharm import local_charm_path
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client, charm_series):
# Deploy charms, there are several under ./repository
charm = local_charm_path(charm='dummy-source', juju_ver=client.version,
series=charm_series, platform='ubuntu')
client.deploy(charm)
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client, bs_manager.series)
return 0
if __name__ == '__main__':
sys.exit(main())
|
<commit_before>#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client):
# Deploy charms, there are several under ./repository
client.deploy('dummy-source')
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client)
return 0
if __name__ == '__main__':
sys.exit(main())
<commit_msg>Use Juju 2 compatible deploy.<commit_after>#!/usr/bin/env python
"""TODO: add rough description of what is assessed in this module."""
from __future__ import print_function
import argparse
import logging
import sys
from deploy_stack import (
BootstrapManager,
)
from jujucharm import local_charm_path
from utility import (
add_basic_testing_arguments,
configure_logging,
)
__metaclass__ = type
log = logging.getLogger("assess_model_change_watcher")
def assess_model_change_watcher(client, charm_series):
# Deploy charms, there are several under ./repository
charm = local_charm_path(charm='dummy-source', juju_ver=client.version,
series=charm_series, platform='ubuntu')
client.deploy(charm)
# Wait for the deployment to finish.
client.wait_for_started()
token = "hello"
client.set_config('dummy-source', {'token': token})
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Model change watcher")
add_basic_testing_arguments(parser)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
configure_logging(args.verbose)
bs_manager = BootstrapManager.from_args(args)
with bs_manager.booted_context(args.upload_tools):
assess_model_change_watcher(bs_manager.client, bs_manager.series)
return 0
if __name__ == '__main__':
sys.exit(main())
|
169a17849349e91cc1673c573437a9922bd07aa5
|
massa/domain.py
|
massa/domain.py
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find(self, id):
stmt = self._table.select(self._table.c.id == id)
row = stmt.execute().fetchone()
return self.make_exposable(row)
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
Add a command to find a measurement by id.
|
Add a command to find a measurement by id.
|
Python
|
mit
|
jaapverloop/massa
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
Add a command to find a measurement by id.
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find(self, id):
stmt = self._table.select(self._table.c.id == id)
row = stmt.execute().fetchone()
return self.make_exposable(row)
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
<commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
<commit_msg>Add a command to find a measurement by id.<commit_after>
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find(self, id):
stmt = self._table.select(self._table.c.id == id)
row = stmt.execute().fetchone()
return self.make_exposable(row)
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
Add a command to find a measurement by id.# -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find(self, id):
stmt = self._table.select(self._table.c.id == id)
row = stmt.execute().fetchone()
return self.make_exposable(row)
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
<commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
<commit_msg>Add a command to find a measurement by id.<commit_after># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
)
def define_tables(metadata):
Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=False),
Column('code', String(25), nullable=False),
Column('note', String(140), nullable=True),
Column('date_measured', Date(), nullable=False),
)
class Db(object):
def __init__(self, engine):
self._meta = MetaData(engine)
define_tables(self._meta)
def make_tables(self):
self._meta.create_all()
def drop_tables(self):
self._meta.drop_all()
@property
def measurement(self):
return self._meta.tables['measurement']
class MeasurementService(object):
def __init__(self, table):
self._table = table
def find(self, id):
stmt = self._table.select(self._table.c.id == id)
row = stmt.execute().fetchone()
return self.make_exposable(row)
def find_all(self):
s = self._table.select()
items = []
for item in s.execute():
items.append(self.make_exposable(item))
return items
def create(self, **kwargs):
i = self._table.insert()
i.execute(**kwargs)
def make_exposable(self, measurement):
return {
'id': measurement.id,
'weight': float(measurement.weight),
'code': measurement.code,
}
|
fa14a8d4733c32269323878b85ac80590ff7f39e
|
pyconde/sponsorship/tasks.py
|
pyconde/sponsorship/tasks.py
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
# Re-use the connection to the server, so that a connection is not
# implicitly created for every mail, as described in the docs:
# https://docs.djangoproject.com/en/dev/topics/email/#sending-multiple-emails
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
Add comment on mail connection
|
Add comment on mail connection
|
Python
|
bsd-3-clause
|
EuroPython/djep,pysv/djep,EuroPython/djep,EuroPython/djep,pysv/djep,pysv/djep,pysv/djep,EuroPython/djep,pysv/djep
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
Add comment on mail connection
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
# Re-use the connection to the server, so that a connection is not
# implicitly created for every mail, as described in the docs:
# https://docs.djangoproject.com/en/dev/topics/email/#sending-multiple-emails
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
<commit_before>from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
<commit_msg>Add comment on mail connection<commit_after>
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
# Re-use the connection to the server, so that a connection is not
# implicitly created for every mail, as described in the docs:
# https://docs.djangoproject.com/en/dev/topics/email/#sending-multiple-emails
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
Add comment on mail connectionfrom contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
# Re-use the connection to the server, so that a connection is not
# implicitly created for every mail, as described in the docs:
# https://docs.djangoproject.com/en/dev/topics/email/#sending-multiple-emails
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
<commit_before>from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
<commit_msg>Add comment on mail connection<commit_after>from contextlib import closing
from django.core import mail
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.auth.models import User
from pyconde.sponsorship.models import JobOffer
from pyconde.accounts.models import Profile
from pyconde.celery import app
@app.task(ignore_result=True)
def send_job_offer(job_offer_id):
try:
offer = JobOffer.objects.select_related('sponsor').get(pk=job_offer_id)
except JobOffer.DoesNotExit:
raise RuntimeError('No job offer found with pk %d' % job_offer_id)
profiles = Profile.objects.filter(accept_job_offers=True).select_related('user')
# Re-use the connection to the server, so that a connection is not
# implicitly created for every mail, as described in the docs:
# https://docs.djangoproject.com/en/dev/topics/email/#sending-multiple-emails
with closing(mail.get_connection()) as connection:
offset = 0
while True:
chunk = profiles[offset:offset+50]
offset += 50
if not chunk:
break
body = render_to_string('sponsorship/emails/job_offer.txt', {
'offer': offer,
'site': Site.objects.get_current()
})
email = mail.EmailMessage(offer.subject, body,
bcc=[profile.user.email for profile in chunk],
headers={'Reply-To': offer.reply_to},
connection=connection
)
email.send()
|
916c4235f4e05d943ce26993e0db0db35993b4e4
|
blinkylib/patterns/gradient.py
|
blinkylib/patterns/gradient.py
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._start_color = start_color
self._end_color = end_color
def setup(self):
super(Gradient, self).setup()
pixels = self._make_rgb_gradient(self._start_color, self._end_color)
self._blinkytape.set_pixels(pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_delta = self._make_delta(start_color.red, end_color.red, pixel_count)
green_delta = self._make_delta(start_color.green, end_color.green, pixel_count)
blue_delta = self._make_delta(start_color.blue, end_color.blue, pixel_count)
pixels = []
for index in range(0, pixel_count):
red = start_color.red + (red_delta * index)
green = start_color.green + (green_delta * index)
blue = start_color.blue + (blue_delta * index)
pixels.append(blinkylib.blinkycolor.BlinkyColor(red, green, blue))
return pixels
def _make_delta(self, start, end, step):
return (end - start) / float(step)
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._pixels = self._make_rgb_gradient(start_color, end_color)
def setup(self):
super(Gradient, self).setup()
self._blinkytape.set_pixels(self._pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_gradient = self._make_gradient(start_color.red, end_color.red, pixel_count)
green_gradient = self._make_gradient(start_color.green, end_color.green, pixel_count)
blue_gradient = self._make_gradient(start_color.blue, end_color.blue, pixel_count)
rgb_gradient = zip(red_gradient, green_gradient, blue_gradient)
return [blinkylib.blinkycolor.BlinkyColor(*rgb) for rgb in rgb_gradient]
def _make_gradient(self, start, end, count):
delta = (end - start) / float(count)
return [start + (delta * index) for index in range(0, count)]
|
Refactor Gradient to clean up loops and redundancy
|
Refactor Gradient to clean up loops and redundancy
|
Python
|
mit
|
jonspeicher/blinkyfun
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._start_color = start_color
self._end_color = end_color
def setup(self):
super(Gradient, self).setup()
pixels = self._make_rgb_gradient(self._start_color, self._end_color)
self._blinkytape.set_pixels(pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_delta = self._make_delta(start_color.red, end_color.red, pixel_count)
green_delta = self._make_delta(start_color.green, end_color.green, pixel_count)
blue_delta = self._make_delta(start_color.blue, end_color.blue, pixel_count)
pixels = []
for index in range(0, pixel_count):
red = start_color.red + (red_delta * index)
green = start_color.green + (green_delta * index)
blue = start_color.blue + (blue_delta * index)
pixels.append(blinkylib.blinkycolor.BlinkyColor(red, green, blue))
return pixels
def _make_delta(self, start, end, step):
return (end - start) / float(step)
Refactor Gradient to clean up loops and redundancy
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._pixels = self._make_rgb_gradient(start_color, end_color)
def setup(self):
super(Gradient, self).setup()
self._blinkytape.set_pixels(self._pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_gradient = self._make_gradient(start_color.red, end_color.red, pixel_count)
green_gradient = self._make_gradient(start_color.green, end_color.green, pixel_count)
blue_gradient = self._make_gradient(start_color.blue, end_color.blue, pixel_count)
rgb_gradient = zip(red_gradient, green_gradient, blue_gradient)
return [blinkylib.blinkycolor.BlinkyColor(*rgb) for rgb in rgb_gradient]
def _make_gradient(self, start, end, count):
delta = (end - start) / float(count)
return [start + (delta * index) for index in range(0, count)]
|
<commit_before>import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._start_color = start_color
self._end_color = end_color
def setup(self):
super(Gradient, self).setup()
pixels = self._make_rgb_gradient(self._start_color, self._end_color)
self._blinkytape.set_pixels(pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_delta = self._make_delta(start_color.red, end_color.red, pixel_count)
green_delta = self._make_delta(start_color.green, end_color.green, pixel_count)
blue_delta = self._make_delta(start_color.blue, end_color.blue, pixel_count)
pixels = []
for index in range(0, pixel_count):
red = start_color.red + (red_delta * index)
green = start_color.green + (green_delta * index)
blue = start_color.blue + (blue_delta * index)
pixels.append(blinkylib.blinkycolor.BlinkyColor(red, green, blue))
return pixels
def _make_delta(self, start, end, step):
return (end - start) / float(step)
<commit_msg>Refactor Gradient to clean up loops and redundancy<commit_after>
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._pixels = self._make_rgb_gradient(start_color, end_color)
def setup(self):
super(Gradient, self).setup()
self._blinkytape.set_pixels(self._pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_gradient = self._make_gradient(start_color.red, end_color.red, pixel_count)
green_gradient = self._make_gradient(start_color.green, end_color.green, pixel_count)
blue_gradient = self._make_gradient(start_color.blue, end_color.blue, pixel_count)
rgb_gradient = zip(red_gradient, green_gradient, blue_gradient)
return [blinkylib.blinkycolor.BlinkyColor(*rgb) for rgb in rgb_gradient]
def _make_gradient(self, start, end, count):
delta = (end - start) / float(count)
return [start + (delta * index) for index in range(0, count)]
|
import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._start_color = start_color
self._end_color = end_color
def setup(self):
super(Gradient, self).setup()
pixels = self._make_rgb_gradient(self._start_color, self._end_color)
self._blinkytape.set_pixels(pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_delta = self._make_delta(start_color.red, end_color.red, pixel_count)
green_delta = self._make_delta(start_color.green, end_color.green, pixel_count)
blue_delta = self._make_delta(start_color.blue, end_color.blue, pixel_count)
pixels = []
for index in range(0, pixel_count):
red = start_color.red + (red_delta * index)
green = start_color.green + (green_delta * index)
blue = start_color.blue + (blue_delta * index)
pixels.append(blinkylib.blinkycolor.BlinkyColor(red, green, blue))
return pixels
def _make_delta(self, start, end, step):
return (end - start) / float(step)
Refactor Gradient to clean up loops and redundancyimport blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._pixels = self._make_rgb_gradient(start_color, end_color)
def setup(self):
super(Gradient, self).setup()
self._blinkytape.set_pixels(self._pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_gradient = self._make_gradient(start_color.red, end_color.red, pixel_count)
green_gradient = self._make_gradient(start_color.green, end_color.green, pixel_count)
blue_gradient = self._make_gradient(start_color.blue, end_color.blue, pixel_count)
rgb_gradient = zip(red_gradient, green_gradient, blue_gradient)
return [blinkylib.blinkycolor.BlinkyColor(*rgb) for rgb in rgb_gradient]
def _make_gradient(self, start, end, count):
delta = (end - start) / float(count)
return [start + (delta * index) for index in range(0, count)]
|
<commit_before>import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._start_color = start_color
self._end_color = end_color
def setup(self):
super(Gradient, self).setup()
pixels = self._make_rgb_gradient(self._start_color, self._end_color)
self._blinkytape.set_pixels(pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_delta = self._make_delta(start_color.red, end_color.red, pixel_count)
green_delta = self._make_delta(start_color.green, end_color.green, pixel_count)
blue_delta = self._make_delta(start_color.blue, end_color.blue, pixel_count)
pixels = []
for index in range(0, pixel_count):
red = start_color.red + (red_delta * index)
green = start_color.green + (green_delta * index)
blue = start_color.blue + (blue_delta * index)
pixels.append(blinkylib.blinkycolor.BlinkyColor(red, green, blue))
return pixels
def _make_delta(self, start, end, step):
return (end - start) / float(step)
<commit_msg>Refactor Gradient to clean up loops and redundancy<commit_after>import blinkypattern
import blinkylib.blinkycolor
class Gradient(blinkypattern.BlinkyPattern):
def __init__(self, blinkytape, start_color, end_color):
super(Gradient, self).__init__(blinkytape)
self._pixels = self._make_rgb_gradient(start_color, end_color)
def setup(self):
super(Gradient, self).setup()
self._blinkytape.set_pixels(self._pixels)
self._blinkytape.update()
def _make_rgb_gradient(self, start_color, end_color):
pixel_count = self._blinkytape.pixel_count
red_gradient = self._make_gradient(start_color.red, end_color.red, pixel_count)
green_gradient = self._make_gradient(start_color.green, end_color.green, pixel_count)
blue_gradient = self._make_gradient(start_color.blue, end_color.blue, pixel_count)
rgb_gradient = zip(red_gradient, green_gradient, blue_gradient)
return [blinkylib.blinkycolor.BlinkyColor(*rgb) for rgb in rgb_gradient]
def _make_gradient(self, start, end, count):
delta = (end - start) / float(count)
return [start + (delta * index) for index in range(0, count)]
|
1093601daf8d42f0e3745788e51c1b843d29f2d7
|
git-keeper-robot/gkeeprobot/keywords/ServerSetupKeywords.py
|
git-keeper-robot/gkeeprobot/keywords/ServerSetupKeywords.py
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def stop_gkeepd(self):
control.run('keeper', 'screen -S gkserver -X quit')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
Add command to stop gkeepd
|
Add command to stop gkeepd
|
Python
|
agpl-3.0
|
git-keeper/git-keeper,git-keeper/git-keeper
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
Add command to stop gkeepd
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def stop_gkeepd(self):
control.run('keeper', 'screen -S gkserver -X quit')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
<commit_before># Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
<commit_msg>Add command to stop gkeepd<commit_after>
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def stop_gkeepd(self):
control.run('keeper', 'screen -S gkserver -X quit')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
Add command to stop gkeepd# Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def stop_gkeepd(self):
control.run('keeper', 'screen -S gkserver -X quit')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
<commit_before># Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
<commit_msg>Add command to stop gkeepd<commit_after># Copyright 2018 Nathan Sommer and Ben Coleman
#
# This program 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from gkeeprobot.control.ServerControl import ServerControl
"""Provides keywords for robotframework to configure gkserver before
testing begins."""
control = ServerControl()
class ServerSetupKeywords:
def add_file_to_server(self, username, filename, target_filename):
control.copy(username, filename, target_filename)
def start_gkeepd(self):
control.run('keeper', 'screen -S gkserver -d -m gkeepd')
def stop_gkeepd(self):
control.run('keeper', 'screen -S gkserver -X quit')
def add_account_on_server(self, faculty_name):
cmd = 'sudo useradd -ms /bin/bash {}'.format(faculty_name)
control.run('keeper', cmd)
def reset_server(self):
control.run_vm_python_script('keeper', 'reset_server.py')
|
17206b44148f490b865561d191f88e85b6181613
|
back_office/tests_models.py
|
back_office/tests_models.py
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertEqual(type(new_class_type), ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertIsInstance(new_class_type, ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
Fix the Class Type Test Cases class name, and enhance the create new
|
Fix the Class Type Test Cases class name, and enhance the create new
|
Python
|
mit
|
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertEqual(type(new_class_type), ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
Fix the Class Type Test Cases class name, and enhance the create new
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertIsInstance(new_class_type, ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
<commit_before>from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertEqual(type(new_class_type), ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
<commit_msg>Fix the Class Type Test Cases class name, and enhance the create new<commit_after>
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertIsInstance(new_class_type, ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertEqual(type(new_class_type), ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
Fix the Class Type Test Cases class name, and enhance the create newfrom decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertIsInstance(new_class_type, ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
<commit_before>from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertEqual(type(new_class_type), ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
<commit_msg>Fix the Class Type Test Cases class name, and enhance the create new<commit_after>from decimal import Decimal
from django.db import IntegrityError
from django.test import TestCase
from .models import ClassType
class ClassTypeTestCases(TestCase):
"""
Testing Class Type model
"""
def setUp(self):
self.class_type, created = ClassType.objects.get_or_create(name='Class Type 1',
monthly_fees=Decimal(12))
def test_create_new_class_type(self):
new_class_type = ClassType(name='Class Type 2',
monthly_fees=Decimal(10))
new_class_type.save()
self.assertIsInstance(new_class_type, ClassType)
self.assertTrue(new_class_type.pk)
def test_update_class_type(self):
new_monthly_fees = Decimal(15)
self.class_type.monthly_fees = new_monthly_fees
self.class_type.save()
self.assertEqual(new_monthly_fees, self.class_type.monthly_fees)
self.assertTrue(self.class_type.pk)
def test_delete_class_type(self):
self.class_type.delete()
self.assertFalse(self.class_type.pk)
def test_create_class_type_with_duplicate_names(self):
new_class_type = ClassType(name='Class Type 1',
monthly_fees=Decimal(10))
self.assertRaises(IntegrityError, lambda: new_class_type.save())
|
3cd9fc540e9989c1842b38d35f9e01bd269a5957
|
pib/stack.py
|
pib/stack.py
|
"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
"""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
Validate the schema when loading it.
|
Validate the schema when loading it.
|
Python
|
apache-2.0
|
datawire/pib
|
"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
Validate the schema when loading it.
|
"""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
<commit_before>"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
<commit_msg>Validate the schema when loading it.<commit_after>
|
"""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
Validate the schema when loading it."""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
<commit_before>"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
<commit_msg>Validate the schema when loading it.<commit_after>"""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
|
f659b022a942acdeef8adf75d32f1e77ee292b88
|
apps/domain/src/main/core/manager/request_manager.py
|
apps/domain/src/main/core/manager/request_manager.py
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(self, user_id, user_name, object_id, reason, request_type):
date = datetime.now()
return self.register(
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
)
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
from syft.core.node.domain.service import RequestStatus
from syft.core.common.uid import UID
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(
self,
user_id,
user_name,
object_id,
reason,
request_type,
verify_key=None,
tags=[],
object_type="",
):
date = datetime.now()
return self.register(
id=str(UID().value),
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
verify_key=verify_key,
tags=tags,
object_type=object_type,
)
def status(self, request_id):
_req = self.first(id=request_id)
if _req.status == "pending":
return RequestStatus.pending
elif _req.status == "accepted":
return RequestStatus.Accepted
else:
return RequestStatus.Rejected
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
Update create_request method / Create status method
|
Update create_request method / Create status method
|
Python
|
apache-2.0
|
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(self, user_id, user_name, object_id, reason, request_type):
date = datetime.now()
return self.register(
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
)
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
Update create_request method / Create status method
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
from syft.core.node.domain.service import RequestStatus
from syft.core.common.uid import UID
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(
self,
user_id,
user_name,
object_id,
reason,
request_type,
verify_key=None,
tags=[],
object_type="",
):
date = datetime.now()
return self.register(
id=str(UID().value),
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
verify_key=verify_key,
tags=tags,
object_type=object_type,
)
def status(self, request_id):
_req = self.first(id=request_id)
if _req.status == "pending":
return RequestStatus.pending
elif _req.status == "accepted":
return RequestStatus.Accepted
else:
return RequestStatus.Rejected
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
<commit_before>from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(self, user_id, user_name, object_id, reason, request_type):
date = datetime.now()
return self.register(
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
)
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
<commit_msg>Update create_request method / Create status method<commit_after>
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
from syft.core.node.domain.service import RequestStatus
from syft.core.common.uid import UID
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(
self,
user_id,
user_name,
object_id,
reason,
request_type,
verify_key=None,
tags=[],
object_type="",
):
date = datetime.now()
return self.register(
id=str(UID().value),
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
verify_key=verify_key,
tags=tags,
object_type=object_type,
)
def status(self, request_id):
_req = self.first(id=request_id)
if _req.status == "pending":
return RequestStatus.pending
elif _req.status == "accepted":
return RequestStatus.Accepted
else:
return RequestStatus.Rejected
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(self, user_id, user_name, object_id, reason, request_type):
date = datetime.now()
return self.register(
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
)
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
Update create_request method / Create status methodfrom typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
from syft.core.node.domain.service import RequestStatus
from syft.core.common.uid import UID
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(
self,
user_id,
user_name,
object_id,
reason,
request_type,
verify_key=None,
tags=[],
object_type="",
):
date = datetime.now()
return self.register(
id=str(UID().value),
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
verify_key=verify_key,
tags=tags,
object_type=object_type,
)
def status(self, request_id):
_req = self.first(id=request_id)
if _req.status == "pending":
return RequestStatus.pending
elif _req.status == "accepted":
return RequestStatus.Accepted
else:
return RequestStatus.Rejected
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
<commit_before>from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(self, user_id, user_name, object_id, reason, request_type):
date = datetime.now()
return self.register(
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
)
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
<commit_msg>Update create_request method / Create status method<commit_after>from typing import Union
from typing import List
from datetime import datetime
from .database_manager import DatabaseManager
from ..database.requests.request import Request
from .role_manager import RoleManager
from ..exceptions import RequestError
from syft.core.node.domain.service import RequestStatus
from syft.core.common.uid import UID
class RequestManager(DatabaseManager):
schema = Request
def __init__(self, database):
self._schema = RequestManager.schema
self.db = database
def first(self, **kwargs) -> Union[None, List]:
result = super().first(**kwargs)
if not result:
raise RequestError
return result
def create_request(
self,
user_id,
user_name,
object_id,
reason,
request_type,
verify_key=None,
tags=[],
object_type="",
):
date = datetime.now()
return self.register(
id=str(UID().value),
user_id=user_id,
user_name=user_name,
object_id=object_id,
date=date,
reason=reason,
request_type=request_type,
verify_key=verify_key,
tags=tags,
object_type=object_type,
)
def status(self, request_id):
_req = self.first(id=request_id)
if _req.status == "pending":
return RequestStatus.pending
elif _req.status == "accepted":
return RequestStatus.Accepted
else:
return RequestStatus.Rejected
def set(self, request_id, status):
self.modify({"id": request_id}, {"status": status})
|
d7bac21f86d1d9cf13439d0ed33da9fdd1b5a552
|
src/setup.py
|
src/setup.py
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
classifiers=[
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
Add a nice list of classifiers.
|
Add a nice list of classifiers.
|
Python
|
bsd-2-clause
|
rubasov/opensub-utils,rubasov/opensub-utils
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
Add a nice list of classifiers.
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
classifiers=[
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
<commit_before>#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
<commit_msg>Add a nice list of classifiers.<commit_after>
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
classifiers=[
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
Add a nice list of classifiers.#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
classifiers=[
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
<commit_before>#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
<commit_msg>Add a nice list of classifiers.<commit_after>#! /usr/bin/python
import os
import setuptools
import sys
# FIXME explain why this is here
sys.path.insert(0,
os.path.join(
os.path.dirname(__file__),
"lib",
))
import opensub
setuptools.setup(
author="Bence Romsics",
author_email="rubasov+opensub@gmail.com",
classifiers=[
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
description="CLI utilities for opensubtitles.org.",
install_requires=[
"docopt",
"six",
],
license="BSD", # FIXME
name="opensub",
package_dir={
"": "lib",
},
packages=[
"opensub",
],
scripts=[
"bin/opensub-get",
"bin/opensub-hash",
],
#test_suite="nose.collector", # FIXME
tests_require=[
"nose",
],
url="http://github.com/rubasov/...", # FIXME
version=opensub.__version__,
zip_safe=False,
)
|
e4ef3df9401bde3c2087a7659a54246de8ec95c6
|
src/api/urls.py
|
src/api/urls.py
|
from rest_framework.routers import SimpleRouter
#
from bingo_server.api import views as bingo_server_views
router = SimpleRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
from rest_framework.routers import DefaultRouter
#
from bingo_server.api import views as bingo_server_views
router = DefaultRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
Add root view to API
|
Add root view to API
|
Python
|
mit
|
steakholders-tm/bingo-server
|
from rest_framework.routers import SimpleRouter
#
from bingo_server.api import views as bingo_server_views
router = SimpleRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
Add root view to API
|
from rest_framework.routers import DefaultRouter
#
from bingo_server.api import views as bingo_server_views
router = DefaultRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
<commit_before>from rest_framework.routers import SimpleRouter
#
from bingo_server.api import views as bingo_server_views
router = SimpleRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
<commit_msg>Add root view to API<commit_after>
|
from rest_framework.routers import DefaultRouter
#
from bingo_server.api import views as bingo_server_views
router = DefaultRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
from rest_framework.routers import SimpleRouter
#
from bingo_server.api import views as bingo_server_views
router = SimpleRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
Add root view to APIfrom rest_framework.routers import DefaultRouter
#
from bingo_server.api import views as bingo_server_views
router = DefaultRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
<commit_before>from rest_framework.routers import SimpleRouter
#
from bingo_server.api import views as bingo_server_views
router = SimpleRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
<commit_msg>Add root view to API<commit_after>from rest_framework.routers import DefaultRouter
#
from bingo_server.api import views as bingo_server_views
router = DefaultRouter()
router.register('games', bingo_server_views.GameViewSet)
urlpatterns = router.urls
|
b59fead0687dd3dbacae703cc1ea0c49305c44eb
|
shcol/cli.py
|
shcol/cli.py
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.'
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.',
version='shcol {}'.format(shcol.__version__)
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
Add command-line option for program version.
|
Add command-line option for program version.
|
Python
|
bsd-2-clause
|
seblin/shcol
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.'
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
Add command-line option for program version.
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.',
version='shcol {}'.format(shcol.__version__)
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
<commit_before>from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.'
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
<commit_msg>Add command-line option for program version.<commit_after>
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.',
version='shcol {}'.format(shcol.__version__)
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.'
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
Add command-line option for program version.from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.',
version='shcol {}'.format(shcol.__version__)
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
<commit_before>from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.'
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
<commit_msg>Add command-line option for program version.<commit_after>from __future__ import print_function
import argparse
import shcol
__all__ = ['main']
def main(cmd_args):
parser = argparse.ArgumentParser(
description='Generate columnized output for given string items.',
version='shcol {}'.format(shcol.__version__)
)
parser.add_argument('items', nargs='+', help='an item to columnize')
parser.add_argument(
'-s', '--spacing', metavar='N', type=int, default=2,
help='number of blank characters between two columns'
)
parser.add_argument(
'-w', '--width', metavar='N', type=int, default=80,
help='maximal amount of characters per line'
)
args = parser.parse_args(cmd_args[1:])
print(shcol.columnize(args.items, args.spacing, args.width))
|
f0c9acaedd9cc36d91758f383a4c703866cde4c7
|
idavoll/error.py
|
idavoll/error.py
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
Adjust spacing to match Twisted's.
|
Adjust spacing to match Twisted's.
--HG--
extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40258
|
Python
|
mit
|
ralphm/idavoll
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
Adjust spacing to match Twisted's.
--HG--
extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40258
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
<commit_before># Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
<commit_msg>Adjust spacing to match Twisted's.
--HG--
extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40258<commit_after>
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
Adjust spacing to match Twisted's.
--HG--
extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40258# Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
<commit_before># Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
<commit_msg>Adjust spacing to match Twisted's.
--HG--
extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40258<commit_after># Copyright (c) 2003-2008 Ralph Meijer
# See LICENSE for details.
class Error(Exception):
msg = ''
def __str__(self):
return self.msg
class NodeNotFound(Error):
pass
class NodeExists(Error):
pass
class NotSubscribed(Error):
"""
Entity is not subscribed to this node.
"""
class SubscriptionExists(Error):
pass
class Forbidden(Error):
pass
class ItemForbidden(Error):
pass
class ItemRequired(Error):
pass
class NoInstantNodes(Error):
pass
class InvalidConfigurationOption(Error):
msg = 'Invalid configuration option'
class InvalidConfigurationValue(Error):
msg = 'Bad configuration value'
class NodeNotPersistent(Error):
pass
class NoRootNode(Error):
pass
|
573cd0271575f933866fe325c31ed54824b3bc3e
|
structure.py
|
structure.py
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y).ljust(6) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
Fix displaying of the matrix.
|
Fix displaying of the matrix.
|
Python
|
mit
|
Ezibenroc/simplex
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
Fix displaying of the matrix.
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y).ljust(6) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
<commit_before>from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
<commit_msg>Fix displaying of the matrix.<commit_after>
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y).ljust(6) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
Fix displaying of the matrix.from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y).ljust(6) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
<commit_before>from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
<commit_msg>Fix displaying of the matrix.<commit_after>from fractions import Fraction
from parser import Parser
class LinearProgram:
def __init__(self):
self.nbVariables = 0
self.nbConstraints = 0
self.objective = None
self.tableaux = None
self.variableFromIndex = {}
self.indexFromVariable = {}
def __str__(self):
return '\n'.join(' '.join(str(y).ljust(6) for y in x) for x in self.tableaux.tolist())
if __name__ == '__main__':
lp = LinearProgram()
parser = Parser(lp, 'example.in')
parser.parse()
print(lp.variableFromIndex)
print(lp.indexFromVariable)
print(lp.nbVariables)
print(lp.nbConstraints)
print(lp)
|
ad0a23312b197c2196e96733ce9ca66249c09f06
|
book/stacks/stack_right.py
|
book/stacks/stack_right.py
|
class Stack(object):
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
class Stack:
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
Make the two Stack implementations consistent
|
Make the two Stack implementations consistent
In terms of whether they inherit from `object` (now they both don't).
|
Python
|
cc0-1.0
|
Bradfield/algos,Bradfield/algorithms-and-data-structures,Bradfield/algorithms-and-data-structures,Bradfield/algorithms-and-data-structures,Bradfield/algos,Bradfield/algos,Bradfield/algos,Bradfield/algorithms-and-data-structures
|
class Stack(object):
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
Make the two Stack implementations consistent
In terms of whether they inherit from `object` (now they both don't).
|
class Stack:
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
<commit_before>class Stack(object):
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
<commit_msg>Make the two Stack implementations consistent
In terms of whether they inherit from `object` (now they both don't).<commit_after>
|
class Stack:
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
class Stack(object):
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
Make the two Stack implementations consistent
In terms of whether they inherit from `object` (now they both don't).class Stack:
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
<commit_before>class Stack(object):
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
<commit_msg>Make the two Stack implementations consistent
In terms of whether they inherit from `object` (now they both don't).<commit_after>class Stack:
def __init__(self):
self._items = []
def is_empty(self):
return not bool(self._items)
def push(self, item):
self._items.append(item)
def pop(self):
return self._items.pop()
def peek(self):
return self._items[-1]
def size(self):
return len(self._items)
|
6b11a3e6fb3f219747eac8cc41c7a8b8b2e34e1d
|
{{cookiecutter.repo_name}}/tests/test_extension.py
|
{{cookiecutter.repo_name}}/tests/test_extension.py
|
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
from __future__ import unicode_literals
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
Add unicode_literals import to test suite
|
Add unicode_literals import to test suite
|
Python
|
apache-2.0
|
mopidy/cookiecutter-mopidy-ext
|
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
Add unicode_literals import to test suite
|
from __future__ import unicode_literals
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
<commit_before>import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
<commit_msg>Add unicode_literals import to test suite<commit_after>
|
from __future__ import unicode_literals
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
Add unicode_literals import to test suitefrom __future__ import unicode_literals
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
<commit_before>import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
<commit_msg>Add unicode_literals import to test suite<commit_after>from __future__ import unicode_literals
import unittest
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
class ExtensionTest(unittest.TestCase):
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
self.assertIn('[{{ cookiecutter.ext_name }}]', config)
self.assertIn('enabled = true', config)
def test_get_config_schema(self):
ext = Extension()
schema = ext.get_config_schema()
# TODO Test the content of your config schema
#self.assertIn('username', schema)
#self.assertIn('password', schema)
# TODO Write more tests
|
50d9601ea0fa35a9d5d831353f5a17b33dc7d8bf
|
panoptes_client/subject_set.py
|
panoptes_client/subject_set.py
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def __init__(self, raw={}, etag=None):
r = super(SubjectSet, self).__init__(raw, etag)
if self.id:
self._edit_attributes[1]['links'] = (
'subjects',
'workflows',
)
return r
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
Revert "Don't try to save SubjectSet.links.project on exiting objects"
|
Revert "Don't try to save SubjectSet.links.project on exiting objects"
This reverts commit b9a107b45cf2569f9effa1c8836a65255f2f3e64.
Superseded by 7d2fecab46f0ede85c00fba8335a8dd74fe16489
|
Python
|
apache-2.0
|
zooniverse/panoptes-python-client
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def __init__(self, raw={}, etag=None):
r = super(SubjectSet, self).__init__(raw, etag)
if self.id:
self._edit_attributes[1]['links'] = (
'subjects',
'workflows',
)
return r
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
Revert "Don't try to save SubjectSet.links.project on exiting objects"
This reverts commit b9a107b45cf2569f9effa1c8836a65255f2f3e64.
Superseded by 7d2fecab46f0ede85c00fba8335a8dd74fe16489
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
<commit_before>from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def __init__(self, raw={}, etag=None):
r = super(SubjectSet, self).__init__(raw, etag)
if self.id:
self._edit_attributes[1]['links'] = (
'subjects',
'workflows',
)
return r
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
<commit_msg>Revert "Don't try to save SubjectSet.links.project on exiting objects"
This reverts commit b9a107b45cf2569f9effa1c8836a65255f2f3e64.
Superseded by 7d2fecab46f0ede85c00fba8335a8dd74fe16489<commit_after>
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def __init__(self, raw={}, etag=None):
r = super(SubjectSet, self).__init__(raw, etag)
if self.id:
self._edit_attributes[1]['links'] = (
'subjects',
'workflows',
)
return r
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
Revert "Don't try to save SubjectSet.links.project on exiting objects"
This reverts commit b9a107b45cf2569f9effa1c8836a65255f2f3e64.
Superseded by 7d2fecab46f0ede85c00fba8335a8dd74fe16489from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
<commit_before>from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def __init__(self, raw={}, etag=None):
r = super(SubjectSet, self).__init__(raw, etag)
if self.id:
self._edit_attributes[1]['links'] = (
'subjects',
'workflows',
)
return r
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
<commit_msg>Revert "Don't try to save SubjectSet.links.project on exiting objects"
This reverts commit b9a107b45cf2569f9effa1c8836a65255f2f3e64.
Superseded by 7d2fecab46f0ede85c00fba8335a8dd74fe16489<commit_after>from panoptes_client.panoptes import PanoptesObject, LinkResolver
from panoptes_client.subject import Subject
class SubjectSet(PanoptesObject):
_api_slug = 'subject_sets'
_link_slug = 'subject_sets'
_edit_attributes = (
'display_name',
{
'links': (
'project',
),
'metadata': (
'category',
)
},
)
def subjects(self):
return Subject.where(subject_set_id=self.id)
def add_subjects(self, subjects):
if not type(subjects) in (tuple, list):
subjects = [subjects]
_subjects = []
for subject in subjects:
if not isinstance(subject, Subject):
raise TypeError
_subjects.append(subject.id)
self.post(
'{}/links/subjects'.format(self.id),
json={'subjects': _subjects}
)
LinkResolver.register(SubjectSet)
|
18a074eac431ba4a556cccb4ebf00aa43647631d
|
SublimePlumbSend.py
|
SublimePlumbSend.py
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.view.run_command("sublime_plumb", message)
self.remove_selection("1")
self.view.sel().clear()
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.remove_selection("1") # in case it was expanded
self.view.sel().clear()
self.view.run_command("sublime_plumb", message)
|
Move selection clearing to before running the action
|
Move selection clearing to before running the action
This allows actions like "jump" to modify the selection
|
Python
|
mit
|
lionicsheriff/SublimeAcmePlumbing
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.view.run_command("sublime_plumb", message)
self.remove_selection("1")
self.view.sel().clear()Move selection clearing to before running the action
This allows actions like "jump" to modify the selection
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.remove_selection("1") # in case it was expanded
self.view.sel().clear()
self.view.run_command("sublime_plumb", message)
|
<commit_before>import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.view.run_command("sublime_plumb", message)
self.remove_selection("1")
self.view.sel().clear()<commit_msg>Move selection clearing to before running the action
This allows actions like "jump" to modify the selection<commit_after>
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.remove_selection("1") # in case it was expanded
self.view.sel().clear()
self.view.run_command("sublime_plumb", message)
|
import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.view.run_command("sublime_plumb", message)
self.remove_selection("1")
self.view.sel().clear()Move selection clearing to before running the action
This allows actions like "jump" to modify the selectionimport sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.remove_selection("1") # in case it was expanded
self.view.sel().clear()
self.view.run_command("sublime_plumb", message)
|
<commit_before>import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.view.run_command("sublime_plumb", message)
self.remove_selection("1")
self.view.sel().clear()<commit_msg>Move selection clearing to before running the action
This allows actions like "jump" to modify the selection<commit_after>import sublime, sublime_plugin
import os
from SublimePlumb.Mouse import MouseCommand
class SublimePlumbSend(MouseCommand):
""" Sends the current selected text to the plumbing """
def run(self, edit):
file_name = self.view.file_name()
message = {
"data": self.view.substr(self.selection_at_cursor()),
"cwd": os.path.dirname(file_name) if file_name else None,
"src": self.view.id(),
}
self.remove_selection("1") # in case it was expanded
self.view.sel().clear()
self.view.run_command("sublime_plumb", message)
|
709b9e57d8ea664715fd9bb89729f99324c3e0c2
|
libs/utils.py
|
libs/utils.py
|
from django.core.cache import cache
#get the cache key for storage
def cache_get_key(*args, **kwargs):
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
#decorator for caching functions
def cache_for(time):
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
from django.core.cache import cache
def cache_get_key(*args, **kwargs):
"""Get the cache key for storage"""
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
def cache_for(time):
"""Decorator for caching functions"""
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
cache.delete(key)
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
Delete cache first before setting new value
|
Delete cache first before setting new value
|
Python
|
mit
|
daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban
|
from django.core.cache import cache
#get the cache key for storage
def cache_get_key(*args, **kwargs):
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
#decorator for caching functions
def cache_for(time):
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
Delete cache first before setting new value
|
from django.core.cache import cache
def cache_get_key(*args, **kwargs):
"""Get the cache key for storage"""
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
def cache_for(time):
"""Decorator for caching functions"""
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
cache.delete(key)
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
<commit_before>from django.core.cache import cache
#get the cache key for storage
def cache_get_key(*args, **kwargs):
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
#decorator for caching functions
def cache_for(time):
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
<commit_msg>Delete cache first before setting new value<commit_after>
|
from django.core.cache import cache
def cache_get_key(*args, **kwargs):
"""Get the cache key for storage"""
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
def cache_for(time):
"""Decorator for caching functions"""
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
cache.delete(key)
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
from django.core.cache import cache
#get the cache key for storage
def cache_get_key(*args, **kwargs):
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
#decorator for caching functions
def cache_for(time):
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
Delete cache first before setting new valuefrom django.core.cache import cache
def cache_get_key(*args, **kwargs):
"""Get the cache key for storage"""
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
def cache_for(time):
"""Decorator for caching functions"""
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
cache.delete(key)
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
<commit_before>from django.core.cache import cache
#get the cache key for storage
def cache_get_key(*args, **kwargs):
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
#decorator for caching functions
def cache_for(time):
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
<commit_msg>Delete cache first before setting new value<commit_after>from django.core.cache import cache
def cache_get_key(*args, **kwargs):
"""Get the cache key for storage"""
import hashlib
serialise = []
for arg in args:
serialise.append(str(arg))
for key,arg in kwargs.items():
if key == "clear_cache":
continue
serialise.append(str(key))
serialise.append(str(arg))
key = hashlib.md5("".join(serialise)).hexdigest()
return key
def cache_for(time):
"""Decorator for caching functions"""
def decorator(fn):
def wrapper(*args, **kwargs):
key = cache_get_key(fn.__name__, *args, **kwargs)
result = cache.get(key)
if not result or "clear_cache" in kwargs and kwargs["clear_cache"]:
cache.delete(key)
result = fn(*args, **kwargs)
cache.set(key, result, time)
return result
return wrapper
return decorator
|
6b49f7b1948ab94631c79304c91f8d5590d03e40
|
addons/project/models/project_config_settings.py
|
addons/project/models/project_config_settings.py
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
@api.onchange('module_sale_timesheet')
def _onchange_module_sale_timesheet(self):
if self.module_sale_timesheet:
self.module_hr_timesheet = True
|
Enable `Timesheets` option if `Time Billing` is enabled
|
[IMP] project: Enable `Timesheets` option if `Time Billing` is enabled
|
Python
|
agpl-3.0
|
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
[IMP] project: Enable `Timesheets` option if `Time Billing` is enabled
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
@api.onchange('module_sale_timesheet')
def _onchange_module_sale_timesheet(self):
if self.module_sale_timesheet:
self.module_hr_timesheet = True
|
<commit_before># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
<commit_msg>[IMP] project: Enable `Timesheets` option if `Time Billing` is enabled<commit_after>
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
@api.onchange('module_sale_timesheet')
def _onchange_module_sale_timesheet(self):
if self.module_sale_timesheet:
self.module_hr_timesheet = True
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
[IMP] project: Enable `Timesheets` option if `Time Billing` is enabled# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
@api.onchange('module_sale_timesheet')
def _onchange_module_sale_timesheet(self):
if self.module_sale_timesheet:
self.module_hr_timesheet = True
|
<commit_before># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
<commit_msg>[IMP] project: Enable `Timesheets` option if `Time Billing` is enabled<commit_after># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ProjectConfiguration(models.TransientModel):
_name = 'project.config.settings'
_inherit = 'res.config.settings'
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_pad = fields.Boolean("Collaborative Pads")
module_hr_timesheet = fields.Boolean("Timesheets")
module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
module_rating_project = fields.Boolean(string="Rating on Tasks")
module_project_forecast = fields.Boolean(string="Forecasts")
module_hr_holidays = fields.Boolean("Leave Management")
module_hr_timesheet_attendance = fields.Boolean("Attendances")
module_sale_timesheet = fields.Boolean("Time Billing")
module_hr_expense = fields.Boolean("Expenses")
group_subtask_project = fields.Boolean("Sub-tasks", implied_group="project.group_subtask_project")
@api.onchange('module_sale_timesheet')
def _onchange_module_sale_timesheet(self):
if self.module_sale_timesheet:
self.module_hr_timesheet = True
|
ac209811feb25dfe9b5eac8b1488b42a8b5d73ba
|
kitsune/kbadge/migrations/0002_auto_20181023_1319.py
|
kitsune/kbadge/migrations/0002_auto_20181023_1319.py
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%'"
)
]
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%' AND image IS NOT NULL AND image != ''"
)
]
|
Update SQL data migration to exclude NULL and blank image values.
|
Update SQL data migration to exclude NULL and blank image values.
|
Python
|
bsd-3-clause
|
mozilla/kitsune,anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune,mozilla/kitsune,anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%'"
)
]
Update SQL data migration to exclude NULL and blank image values.
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%' AND image IS NOT NULL AND image != ''"
)
]
|
<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%'"
)
]
<commit_msg>Update SQL data migration to exclude NULL and blank image values.<commit_after>
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%' AND image IS NOT NULL AND image != ''"
)
]
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%'"
)
]
Update SQL data migration to exclude NULL and blank image values.# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%' AND image IS NOT NULL AND image != ''"
)
]
|
<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%'"
)
]
<commit_msg>Update SQL data migration to exclude NULL and blank image values.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kbadge', '0001_initial'),
]
operations = [
migrations.RunSQL(
"UPDATE badger_badge SET image = CONCAT('uploads/', image) WHERE image NOT LIKE 'uploads/%' AND image IS NOT NULL AND image != ''"
)
]
|
db3727fb6cbb8ce9b1e413a618fae621a3d72189
|
openassets/__init__.py
|
openassets/__init__.py
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = "1.0"
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = '1.0'
|
Use single quotes for strings
|
Use single quotes for strings
|
Python
|
mit
|
OpenAssets/openassets
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = "1.0"Use single quotes for strings
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = '1.0'
|
<commit_before># -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = "1.0"<commit_msg>Use single quotes for strings<commit_after>
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = '1.0'
|
# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = "1.0"Use single quotes for strings# -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = '1.0'
|
<commit_before># -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = "1.0"<commit_msg>Use single quotes for strings<commit_after># -*- coding: utf-8; -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Flavien Charlon
#
# 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 the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
Reference implementation of the Open Assets Protocol.
"""
__version__ = '1.0'
|
3761217b9d835f862418d580dcf1342734befe45
|
system.py
|
system.py
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
blood = 64
|
Fix flags bug hasattr returns True if the attribute is None
|
Fix flags bug hasattr returns True if the attribute is None
Use forward references for type hinting in entity
|
Python
|
agpl-3.0
|
joetsoi/moonstone,joetsoi/moonstone
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
Fix flags bug hasattr returns True if the attribute is None
Use forward references for type hinting in entity
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
blood = 64
|
<commit_before>from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
<commit_msg>Fix flags bug hasattr returns True if the attribute is None
Use forward references for type hinting in entity<commit_after>
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
blood = 64
|
from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
Fix flags bug hasattr returns True if the attribute is None
Use forward references for type hinting in entityfrom enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
blood = 64
|
<commit_before>from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
<commit_msg>Fix flags bug hasattr returns True if the attribute is None
Use forward references for type hinting in entity<commit_after>from enum import IntFlag
class SystemFlag(IntFlag):
controller = 1
movement = 2
graphics = 4
collision = 8
logic = 16
state = 32
blood = 64
|
4e2f64164b09c481a56920c1b98dd2a38ac02338
|
scripts/process_realtime_data.py
|
scripts/process_realtime_data.py
|
import django
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
process_realtime_dumps.process_next(10)
|
import django
#import cProfile
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
#cProfile.run('process_realtime_dumps.process_next(10)', filename='output.txt')
process_realtime_dumps.process_next(10)
|
Add profiling code (commented) for profiling the realtime processing.
|
Add profiling code (commented) for profiling the realtime processing.
|
Python
|
mit
|
katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming
|
import django
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
process_realtime_dumps.process_next(10)
Add profiling code (commented) for profiling the realtime processing.
|
import django
#import cProfile
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
#cProfile.run('process_realtime_dumps.process_next(10)', filename='output.txt')
process_realtime_dumps.process_next(10)
|
<commit_before>import django
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
process_realtime_dumps.process_next(10)
<commit_msg>Add profiling code (commented) for profiling the realtime processing.<commit_after>
|
import django
#import cProfile
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
#cProfile.run('process_realtime_dumps.process_next(10)', filename='output.txt')
process_realtime_dumps.process_next(10)
|
import django
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
process_realtime_dumps.process_next(10)
Add profiling code (commented) for profiling the realtime processing.import django
#import cProfile
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
#cProfile.run('process_realtime_dumps.process_next(10)', filename='output.txt')
process_realtime_dumps.process_next(10)
|
<commit_before>import django
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
process_realtime_dumps.process_next(10)
<commit_msg>Add profiling code (commented) for profiling the realtime processing.<commit_after>import django
#import cProfile
django.setup()
from busshaming.data_processing import process_realtime_dumps
if __name__ == '__main__':
#cProfile.run('process_realtime_dumps.process_next(10)', filename='output.txt')
process_realtime_dumps.process_next(10)
|
50f8efd7bcbf032fd0295c460b98640d0bf6c1ed
|
smithers/smithers/conf/server.py
|
smithers/smithers/conf/server.py
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = 'graphite1.private.phx1.mozilla.com'
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = getenv('STATSD_HOST', 'graphite1.private.phx1.mozilla.com')
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
Make statsd host configurable via env.
|
Make statsd host configurable via env.
|
Python
|
mpl-2.0
|
mozilla/mrburns,mozilla/mrburns,mozilla/mrburns
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = 'graphite1.private.phx1.mozilla.com'
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
Make statsd host configurable via env.
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = getenv('STATSD_HOST', 'graphite1.private.phx1.mozilla.com')
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
<commit_before>from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = 'graphite1.private.phx1.mozilla.com'
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
<commit_msg>Make statsd host configurable via env.<commit_after>
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = getenv('STATSD_HOST', 'graphite1.private.phx1.mozilla.com')
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = 'graphite1.private.phx1.mozilla.com'
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
Make statsd host configurable via env.from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = getenv('STATSD_HOST', 'graphite1.private.phx1.mozilla.com')
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
<commit_before>from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = 'graphite1.private.phx1.mozilla.com'
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
<commit_msg>Make statsd host configurable via env.<commit_after>from os import getenv
GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'
STATSD_HOST = getenv('STATSD_HOST', 'graphite1.private.phx1.mozilla.com')
STATSD_PORT = 8125
STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV'))
COUNTRY_MIN_SHARE = 500
|
ea046e8996c3bbad95578ef3209b62972d88e720
|
opps/images/widgets.py
|
opps/images/widgets.py
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
_height = ""
_width = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
_height = value.height
_width = value.width
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
'height': _height,
'width': _width,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
Add _height/_width on widget MultipleUpload
|
Add _height/_width on widget MultipleUpload
|
Python
|
mit
|
jeanmask/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,opps/opps
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
Add _height/_width on widget MultipleUpload
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
_height = ""
_width = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
_height = value.height
_width = value.width
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
'height': _height,
'width': _width,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
<commit_before>from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
<commit_msg>Add _height/_width on widget MultipleUpload<commit_after>
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
_height = ""
_width = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
_height = value.height
_width = value.width
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
'height': _height,
'width': _width,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
Add _height/_width on widget MultipleUploadfrom django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
_height = ""
_width = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
_height = value.height
_width = value.width
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
'height': _height,
'width': _width,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
<commit_before>from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
<commit_msg>Add _height/_width on widget MultipleUpload<commit_after>from django import forms
from django.conf import settings
from django.template.loader import render_to_string
class MultipleUpload(forms.FileInput):
def render(self, name, value, attrs=None):
_value = ""
_height = ""
_width = ""
if value:
_value = "{0}{1}".format(settings.MEDIA_URL, value)
_height = value.height
_width = value.width
return render_to_string("admin/opps/images/multiupload.html",
{"name": name, "value": _value,
'height': _height,
'width': _width,
"STATIC_URL": settings.STATIC_URL})
class CropExample(forms.TextInput):
def render(self, name, value, attrs=None):
return render_to_string(
"admin/opps/images/cropexample.html",
{"name": name, "value": value,
'STATIC_URL': settings.STATIC_URL,
"THUMBOR_SERVER": settings.THUMBOR_SERVER,
"THUMBOR_MEDIA_URL": settings.THUMBOR_MEDIA_URL})
|
774bf218202e48d0c9d14f79326c1d8847506999
|
nupic/research/frameworks/dynamic_sparse/__init__.py
|
nupic/research/frameworks/dynamic_sparse/__init__.py
|
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
#
|
Add license to top of file.
|
Add license to top of file.
|
Python
|
agpl-3.0
|
mrcslws/nupic.research,mrcslws/nupic.research,subutai/nupic.research,numenta/nupic.research,subutai/nupic.research,numenta/nupic.research
|
Add license to top of file.
|
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
#
|
<commit_before><commit_msg>Add license to top of file. <commit_after>
|
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
#
|
Add license to top of file. # Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
#
|
<commit_before><commit_msg>Add license to top of file. <commit_after># Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
#
|
|
a783c1739a4e6629f428904901d674dedca971f9
|
l10n_ch_payment_slip/__manifest__.py
|
l10n_ch_payment_slip/__manifest__.py
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/bank-statement-reconcile
'web',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/account-reconcile
'web',
'l10n_ch',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
Fix dependency to remove std print isr button
|
Fix dependency to remove std print isr button
|
Python
|
agpl-3.0
|
brain-tec/l10n-switzerland,brain-tec/l10n-switzerland,brain-tec/l10n-switzerland
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/bank-statement-reconcile
'web',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
Fix dependency to remove std print isr button
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/account-reconcile
'web',
'l10n_ch',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
<commit_before># Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/bank-statement-reconcile
'web',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
<commit_msg>Fix dependency to remove std print isr button<commit_after>
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/account-reconcile
'web',
'l10n_ch',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/bank-statement-reconcile
'web',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
Fix dependency to remove std print isr button# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/account-reconcile
'web',
'l10n_ch',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
<commit_before># Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/bank-statement-reconcile
'web',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
<commit_msg>Fix dependency to remove std print isr button<commit_after># Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
'license': 'AGPL-3',
'depends': [
'account',
'account_invoicing',
'l10n_ch_base_bank',
'base_transaction_id', # OCA/account-reconcile
'web',
'l10n_ch',
],
'data': [
"views/report_xml_templates.xml",
"views/bank.xml",
"views/account_invoice.xml",
"views/res_config_settings_views.xml",
"wizard/isr_batch_print.xml",
"report/report_declaration.xml",
"security/ir.model.access.csv"
],
'demo': [],
'auto_install': False,
'installable': True,
'images': [],
'external_dependencies': {
'python': [
'PyPDF2',
]
}
}
|
a1eaf7bcd40b96d4074202174af3dab5a0d026e1
|
projects/templatetags/projects_tags.py
|
projects/templatetags/projects_tags.py
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_id):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_id)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_key):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_key)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
Change the project_tags parameter to use build_key which makes it clearer.
|
Change the project_tags parameter to use build_key which makes it clearer.
|
Python
|
mit
|
caio1982/capomastro,caio1982/capomastro,caio1982/capomastro
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_id):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_id)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
Change the project_tags parameter to use build_key which makes it clearer.
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_key):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_key)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
<commit_before>from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_id):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_id)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
<commit_msg>Change the project_tags parameter to use build_key which makes it clearer.<commit_after>
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_key):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_key)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_id):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_id)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
Change the project_tags parameter to use build_key which makes it clearer.from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_key):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_key)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
<commit_before>from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_id):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_id)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
<commit_msg>Change the project_tags parameter to use build_key which makes it clearer.<commit_after>from django.template.base import Library
from django.core.urlresolvers import reverse
from projects.models import ProjectBuild
register = Library()
@register.simple_tag()
def build_url(build_key):
"""
Fetches the ProjectBuild for a given build_id, if any.
"""
try:
build = ProjectBuild.objects.get(build_key=build_key)
return reverse(
"project_projectbuild_detail",
kwargs={"project_pk": build.project.pk, "build_pk": build.pk})
except ProjectBuild.DoesNotExist:
return ""
|
e0f102d9af8b13da65736eb6dd185de64d3dbafb
|
susumutakuan.py
|
susumutakuan.py
|
import discord
import asyncio
import os
import signal
import sys
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
elif message.content.startswith('!sleep'):
await asyncio.sleep(5)
await client.send_message(message.channel, 'Done sleeping')
client.run(CLIENT_TOKEN)
|
import discord
import asyncio
import os
import signal
import sys
import subprocess
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
#Look at DMs for special commands
if message.channel.startswith('Direct Message'):
if message.content.startswith('!update'):
tmp = await client.send_message(message.channel, 'Updating my code via git...')
subprocess.call(["ls", "-l"])
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
#Start event loop
client.run(CLIENT_TOKEN)
|
Add DM support, and first start at self-update
|
Add DM support, and first start at self-update
|
Python
|
mit
|
gryffon/SusumuTakuan,gryffon/SusumuTakuan
|
import discord
import asyncio
import os
import signal
import sys
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
elif message.content.startswith('!sleep'):
await asyncio.sleep(5)
await client.send_message(message.channel, 'Done sleeping')
client.run(CLIENT_TOKEN)Add DM support, and first start at self-update
|
import discord
import asyncio
import os
import signal
import sys
import subprocess
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
#Look at DMs for special commands
if message.channel.startswith('Direct Message'):
if message.content.startswith('!update'):
tmp = await client.send_message(message.channel, 'Updating my code via git...')
subprocess.call(["ls", "-l"])
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
#Start event loop
client.run(CLIENT_TOKEN)
|
<commit_before>import discord
import asyncio
import os
import signal
import sys
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
elif message.content.startswith('!sleep'):
await asyncio.sleep(5)
await client.send_message(message.channel, 'Done sleeping')
client.run(CLIENT_TOKEN)<commit_msg>Add DM support, and first start at self-update<commit_after>
|
import discord
import asyncio
import os
import signal
import sys
import subprocess
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
#Look at DMs for special commands
if message.channel.startswith('Direct Message'):
if message.content.startswith('!update'):
tmp = await client.send_message(message.channel, 'Updating my code via git...')
subprocess.call(["ls", "-l"])
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
#Start event loop
client.run(CLIENT_TOKEN)
|
import discord
import asyncio
import os
import signal
import sys
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
elif message.content.startswith('!sleep'):
await asyncio.sleep(5)
await client.send_message(message.channel, 'Done sleeping')
client.run(CLIENT_TOKEN)Add DM support, and first start at self-updateimport discord
import asyncio
import os
import signal
import sys
import subprocess
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
#Look at DMs for special commands
if message.channel.startswith('Direct Message'):
if message.content.startswith('!update'):
tmp = await client.send_message(message.channel, 'Updating my code via git...')
subprocess.call(["ls", "-l"])
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
#Start event loop
client.run(CLIENT_TOKEN)
|
<commit_before>import discord
import asyncio
import os
import signal
import sys
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
elif message.content.startswith('!sleep'):
await asyncio.sleep(5)
await client.send_message(message.channel, 'Done sleeping')
client.run(CLIENT_TOKEN)<commit_msg>Add DM support, and first start at self-update<commit_after>import discord
import asyncio
import os
import signal
import sys
import subprocess
#Set up Client State
CLIENT_TOKEN=os.environ['TOKEN']
#Create Discord client
client = discord.Client()
#Handle shutdown gracefully
def sigterm_handler(signum, frame):
print('Logging out...', flush=True)
raise KeyboardInterrupt
sys.exit('Shutting down...')
#Register SIGTERM Handler
signal.signal(signal.SIGTERM, sigterm_handler)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
#Look at DMs for special commands
if message.channel.startswith('Direct Message'):
if message.content.startswith('!update'):
tmp = await client.send_message(message.channel, 'Updating my code via git...')
subprocess.call(["ls", "-l"])
if message.content.startswith('!test'):
counter = 0
tmp = await client.send_message(message.channel, 'Calculating messages...')
async for log in client.logs_from(message.channel, limit=100):
if log.author == message.author:
counter += 1
await client.edit_message(tmp, 'You have {} messages.'.format(counter))
#Start event loop
client.run(CLIENT_TOKEN)
|
b990ce64de70f9aec3bc4480b1a7714aa5701a45
|
aiohttp/__init__.py
|
aiohttp/__init__.py
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__'))
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
from .file_sender import FileSender # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__', 'FileSender'))
|
Add FileSender to top level
|
Add FileSender to top level
|
Python
|
apache-2.0
|
KeepSafe/aiohttp,jettify/aiohttp,pfreixes/aiohttp,z2v/aiohttp,panda73111/aiohttp,rutsky/aiohttp,mind1master/aiohttp,singulared/aiohttp,z2v/aiohttp,juliatem/aiohttp,KeepSafe/aiohttp,Eyepea/aiohttp,arthurdarcet/aiohttp,jettify/aiohttp,moden-py/aiohttp,arthurdarcet/aiohttp,alex-eri/aiohttp-1,KeepSafe/aiohttp,panda73111/aiohttp,esaezgil/aiohttp,arthurdarcet/aiohttp,pfreixes/aiohttp,singulared/aiohttp,jettify/aiohttp,hellysmile/aiohttp,AraHaanOrg/aiohttp,esaezgil/aiohttp,esaezgil/aiohttp,z2v/aiohttp,moden-py/aiohttp,mind1master/aiohttp,panda73111/aiohttp,singulared/aiohttp,AraHaanOrg/aiohttp,juliatem/aiohttp,alex-eri/aiohttp-1,hellysmile/aiohttp,rutsky/aiohttp,playpauseandstop/aiohttp,mind1master/aiohttp,rutsky/aiohttp,moden-py/aiohttp,alex-eri/aiohttp-1
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__'))
Add FileSender to top level
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
from .file_sender import FileSender # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__', 'FileSender'))
|
<commit_before># This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__'))
<commit_msg>Add FileSender to top level<commit_after>
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
from .file_sender import FileSender # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__', 'FileSender'))
|
# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__'))
Add FileSender to top level# This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
from .file_sender import FileSender # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__', 'FileSender'))
|
<commit_before># This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__'))
<commit_msg>Add FileSender to top level<commit_after># This relies on each of the submodules having an __all__ variable.
__version__ = '0.22.0a0'
import multidict # noqa
from multidict import * # noqa
from . import hdrs # noqa
from .protocol import * # noqa
from .connector import * # noqa
from .client import * # noqa
from .client_reqrep import * # noqa
from .errors import * # noqa
from .helpers import * # noqa
from .parsers import * # noqa
from .streams import * # noqa
from .multipart import * # noqa
from .websocket_client import * # noqa
from .file_sender import FileSender # noqa
__all__ = (client.__all__ + # noqa
client_reqrep.__all__ + # noqa
errors.__all__ + # noqa
helpers.__all__ + # noqa
parsers.__all__ + # noqa
protocol.__all__ + # noqa
connector.__all__ + # noqa
streams.__all__ + # noqa
multidict.__all__ + # noqa
multipart.__all__ + # noqa
websocket_client.__all__ + # noqa
('hdrs', '__version__', 'FileSender'))
|
122ba850fb9d7c9ca51d66714dd38cb2187134f3
|
Lib/setup.py
|
Lib/setup.py
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
#config.add_subpackage('cluster')
#config.add_subpackage('fftpack')
#config.add_subpackage('integrate')
#config.add_subpackage('interpolate')
#config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
#config.add_subpackage('linsolve')
#config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
#config.add_subpackage('sandbox')
#config.add_subpackage('signal')
#config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
#config.add_subpackage('ndimage')
#config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('linsolve')
config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
config.add_subpackage('sandbox')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.
|
Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.
|
Python
|
bsd-3-clause
|
josephcslater/scipy,rmcgibbo/scipy,ndchorley/scipy,lukauskas/scipy,vberaudi/scipy,dch312/scipy,gfyoung/scipy,andyfaff/scipy,chatcannon/scipy,WarrenWeckesser/scipy,mtrbean/scipy,argriffing/scipy,nvoron23/scipy,WillieMaddox/scipy,aarchiba/scipy,anntzer/scipy,lhilt/scipy,nonhermitian/scipy,teoliphant/scipy,minhlongdo/scipy,WarrenWeckesser/scipy,piyush0609/scipy,dominicelse/scipy,mingwpy/scipy,ales-erjavec/scipy,gef756/scipy,mtrbean/scipy,pnedunuri/scipy,zerothi/scipy,andim/scipy,nvoron23/scipy,jseabold/scipy,lukauskas/scipy,lhilt/scipy,minhlongdo/scipy,Stefan-Endres/scipy,chatcannon/scipy,gef756/scipy,niknow/scipy,rgommers/scipy,scipy/scipy,mortada/scipy,andyfaff/scipy,giorgiop/scipy,sauliusl/scipy,mortonjt/scipy,arokem/scipy,raoulbq/scipy,ChanderG/scipy,Shaswat27/scipy,argriffing/scipy,felipebetancur/scipy,gef756/scipy,sonnyhu/scipy,endolith/scipy,grlee77/scipy,niknow/scipy,kleskjr/scipy,Shaswat27/scipy,mgaitan/scipy,niknow/scipy,surhudm/scipy,pizzathief/scipy,josephcslater/scipy,mhogg/scipy,pyramania/scipy,Stefan-Endres/scipy,efiring/scipy,nonhermitian/scipy,WillieMaddox/scipy,ales-erjavec/scipy,cpaulik/scipy,gfyoung/scipy,kalvdans/scipy,jjhelmus/scipy,hainm/scipy,maniteja123/scipy,witcxc/scipy,ortylp/scipy,gef756/scipy,fernand/scipy,Srisai85/scipy,njwilson23/scipy,pyramania/scipy,pschella/scipy,jjhelmus/scipy,behzadnouri/scipy,mhogg/scipy,rmcgibbo/scipy,ndchorley/scipy,trankmichael/scipy,pizzathief/scipy,jjhelmus/scipy,woodscn/scipy,anntzer/scipy,anielsen001/scipy,chatcannon/scipy,ChanderG/scipy,gfyoung/scipy,Gillu13/scipy,sargas/scipy,futurulus/scipy,vberaudi/scipy,tylerjereddy/scipy,jsilter/scipy,woodscn/scipy,tylerjereddy/scipy,perimosocordiae/scipy,matthewalbani/scipy,ales-erjavec/scipy,woodscn/scipy,Newman101/scipy,andim/scipy,jonycgn/scipy,njwilson23/scipy,hainm/scipy,vhaasteren/scipy,pbrod/scipy,newemailjdm/scipy,behzadnouri/scipy,aman-iitj/scipy,scipy/scipy,juliantaylor/scipy,ChanderG/scipy,mortonjt/scipy,Eric89GXL/scipy,jor-/scipy,aeklant/scipy,aman-iitj/scipy,mikebenfield/scipy,sonnyhu/scipy,pschella/scipy,matthewalbani/scipy,petebachant/scipy,zaxliu/scipy,jonycgn/scipy,mgaitan/scipy,aarchiba/scipy,hainm/scipy,kalvdans/scipy,minhlongdo/scipy,Stefan-Endres/scipy,jjhelmus/scipy,kleskjr/scipy,behzadnouri/scipy,e-q/scipy,newemailjdm/scipy,witcxc/scipy,Kamp9/scipy,endolith/scipy,aarchiba/scipy,rmcgibbo/scipy,piyush0609/scipy,rgommers/scipy,rgommers/scipy,jsilter/scipy,pizzathief/scipy,argriffing/scipy,futurulus/scipy,sonnyhu/scipy,piyush0609/scipy,ilayn/scipy,pnedunuri/scipy,vhaasteren/scipy,ndchorley/scipy,e-q/scipy,fredrikw/scipy,vanpact/scipy,newemailjdm/scipy,nvoron23/scipy,mortada/scipy,ogrisel/scipy,pbrod/scipy,matthew-brett/scipy,tylerjereddy/scipy,scipy/scipy,Srisai85/scipy,FRidh/scipy,pschella/scipy,maciejkula/scipy,jor-/scipy,trankmichael/scipy,Eric89GXL/scipy,mtrbean/scipy,jsilter/scipy,grlee77/scipy,ogrisel/scipy,anielsen001/scipy,jakevdp/scipy,Stefan-Endres/scipy,juliantaylor/scipy,nmayorov/scipy,befelix/scipy,jakevdp/scipy,raoulbq/scipy,rmcgibbo/scipy,ndchorley/scipy,futurulus/scipy,zxsted/scipy,befelix/scipy,sonnyhu/scipy,petebachant/scipy,haudren/scipy,Gillu13/scipy,trankmichael/scipy,endolith/scipy,gertingold/scipy,mtrbean/scipy,raoulbq/scipy,efiring/scipy,ortylp/scipy,gertingold/scipy,mingwpy/scipy,befelix/scipy,zaxliu/scipy,njwilson23/scipy,maciejkula/scipy,mdhaber/scipy,raoulbq/scipy,dominicelse/scipy,bkendzior/scipy,Kamp9/scipy,Newman101/scipy,argriffing/scipy,sriki18/scipy,maniteja123/scipy,pbrod/scipy,zxsted/scipy,haudren/scipy,FRidh/scipy,kleskjr/scipy,larsmans/scipy,grlee77/scipy,richardotis/scipy,jonycgn/scipy,dch312/scipy,futurulus/scipy,futurulus/scipy,sauliusl/scipy,andim/scipy,matthew-brett/scipy,sauliusl/scipy,rmcgibbo/scipy,rgommers/scipy,ogrisel/scipy,Shaswat27/scipy,jakevdp/scipy,aeklant/scipy,mingwpy/scipy,vanpact/scipy,pyramania/scipy,Shaswat27/scipy,bkendzior/scipy,njwilson23/scipy,mhogg/scipy,gdooper/scipy,Dapid/scipy,raoulbq/scipy,felipebetancur/scipy,ilayn/scipy,pnedunuri/scipy,anielsen001/scipy,Dapid/scipy,nonhermitian/scipy,rgommers/scipy,cpaulik/scipy,andyfaff/scipy,Gillu13/scipy,gertingold/scipy,matthewalbani/scipy,jsilter/scipy,jonycgn/scipy,kleskjr/scipy,haudren/scipy,jakevdp/scipy,efiring/scipy,e-q/scipy,perimosocordiae/scipy,minhlongdo/scipy,Eric89GXL/scipy,fredrikw/scipy,nmayorov/scipy,Eric89GXL/scipy,mortada/scipy,cpaulik/scipy,Stefan-Endres/scipy,matthew-brett/scipy,apbard/scipy,anntzer/scipy,sriki18/scipy,nmayorov/scipy,witcxc/scipy,Shaswat27/scipy,bkendzior/scipy,jamestwebber/scipy,jonycgn/scipy,pyramania/scipy,petebachant/scipy,mdhaber/scipy,larsmans/scipy,cpaulik/scipy,minhlongdo/scipy,jonycgn/scipy,njwilson23/scipy,apbard/scipy,josephcslater/scipy,trankmichael/scipy,sonnyhu/scipy,person142/scipy,ales-erjavec/scipy,sargas/scipy,gertingold/scipy,mhogg/scipy,efiring/scipy,ilayn/scipy,vhaasteren/scipy,piyush0609/scipy,futurulus/scipy,Gillu13/scipy,maniteja123/scipy,arokem/scipy,fernand/scipy,surhudm/scipy,dch312/scipy,vigna/scipy,josephcslater/scipy,andim/scipy,jseabold/scipy,woodscn/scipy,perimosocordiae/scipy,mikebenfield/scipy,kleskjr/scipy,zerothi/scipy,surhudm/scipy,zerothi/scipy,arokem/scipy,dominicelse/scipy,mhogg/scipy,pizzathief/scipy,vhaasteren/scipy,nonhermitian/scipy,mingwpy/scipy,anntzer/scipy,mortada/scipy,aman-iitj/scipy,richardotis/scipy,zxsted/scipy,petebachant/scipy,mhogg/scipy,zerothi/scipy,sonnyhu/scipy,pnedunuri/scipy,nonhermitian/scipy,mortonjt/scipy,mikebenfield/scipy,fredrikw/scipy,Newman101/scipy,vigna/scipy,efiring/scipy,anntzer/scipy,niknow/scipy,vhaasteren/scipy,tylerjereddy/scipy,andyfaff/scipy,ndchorley/scipy,giorgiop/scipy,fredrikw/scipy,jjhelmus/scipy,piyush0609/scipy,ortylp/scipy,richardotis/scipy,zerothi/scipy,aarchiba/scipy,andyfaff/scipy,jamestwebber/scipy,ortylp/scipy,fernand/scipy,teoliphant/scipy,ales-erjavec/scipy,bkendzior/scipy,sargas/scipy,lukauskas/scipy,e-q/scipy,maniteja123/scipy,dominicelse/scipy,petebachant/scipy,endolith/scipy,maciejkula/scipy,anntzer/scipy,jseabold/scipy,sauliusl/scipy,larsmans/scipy,gef756/scipy,richardotis/scipy,Srisai85/scipy,anielsen001/scipy,josephcslater/scipy,WarrenWeckesser/scipy,felipebetancur/scipy,piyush0609/scipy,vberaudi/scipy,apbard/scipy,woodscn/scipy,person142/scipy,mdhaber/scipy,zaxliu/scipy,maniteja123/scipy,pbrod/scipy,njwilson23/scipy,kleskjr/scipy,ChanderG/scipy,Newman101/scipy,felipebetancur/scipy,behzadnouri/scipy,argriffing/scipy,maciejkula/scipy,matthewalbani/scipy,grlee77/scipy,nmayorov/scipy,Dapid/scipy,jor-/scipy,Srisai85/scipy,matthew-brett/scipy,minhlongdo/scipy,apbard/scipy,mortonjt/scipy,mdhaber/scipy,giorgiop/scipy,larsmans/scipy,ndchorley/scipy,scipy/scipy,mtrbean/scipy,WarrenWeckesser/scipy,dch312/scipy,lukauskas/scipy,juliantaylor/scipy,mgaitan/scipy,fernand/scipy,perimosocordiae/scipy,pbrod/scipy,gfyoung/scipy,person142/scipy,richardotis/scipy,zaxliu/scipy,mgaitan/scipy,trankmichael/scipy,Kamp9/scipy,haudren/scipy,mikebenfield/scipy,trankmichael/scipy,aman-iitj/scipy,surhudm/scipy,jseabold/scipy,kalvdans/scipy,gertingold/scipy,person142/scipy,fernand/scipy,Shaswat27/scipy,ogrisel/scipy,mortonjt/scipy,nvoron23/scipy,giorgiop/scipy,WillieMaddox/scipy,pizzathief/scipy,mgaitan/scipy,zxsted/scipy,Eric89GXL/scipy,mortada/scipy,fredrikw/scipy,apbard/scipy,woodscn/scipy,Kamp9/scipy,ilayn/scipy,sriki18/scipy,arokem/scipy,WillieMaddox/scipy,newemailjdm/scipy,andyfaff/scipy,kalvdans/scipy,vigna/scipy,nvoron23/scipy,aman-iitj/scipy,dominicelse/scipy,endolith/scipy,aarchiba/scipy,sargas/scipy,lhilt/scipy,juliantaylor/scipy,cpaulik/scipy,felipebetancur/scipy,arokem/scipy,Newman101/scipy,FRidh/scipy,andim/scipy,mdhaber/scipy,scipy/scipy,zaxliu/scipy,jor-/scipy,Gillu13/scipy,sauliusl/scipy,felipebetancur/scipy,jseabold/scipy,surhudm/scipy,WillieMaddox/scipy,dch312/scipy,jor-/scipy,zxsted/scipy,pnedunuri/scipy,gdooper/scipy,ortylp/scipy,Newman101/scipy,zaxliu/scipy,mgaitan/scipy,vanpact/scipy,Stefan-Endres/scipy,sriki18/scipy,teoliphant/scipy,aeklant/scipy,witcxc/scipy,bkendzior/scipy,mingwpy/scipy,e-q/scipy,efiring/scipy,anielsen001/scipy,vigna/scipy,hainm/scipy,behzadnouri/scipy,andim/scipy,FRidh/scipy,FRidh/scipy,sargas/scipy,lhilt/scipy,hainm/scipy,aeklant/scipy,perimosocordiae/scipy,jseabold/scipy,scipy/scipy,rmcgibbo/scipy,Eric89GXL/scipy,befelix/scipy,gef756/scipy,ilayn/scipy,pbrod/scipy,jsilter/scipy,matthewalbani/scipy,vberaudi/scipy,vanpact/scipy,anielsen001/scipy,kalvdans/scipy,haudren/scipy,surhudm/scipy,jamestwebber/scipy,newemailjdm/scipy,witcxc/scipy,nmayorov/scipy,sriki18/scipy,Srisai85/scipy,giorgiop/scipy,Dapid/scipy,fredrikw/scipy,gfyoung/scipy,mingwpy/scipy,zerothi/scipy,person142/scipy,WillieMaddox/scipy,sriki18/scipy,maniteja123/scipy,vberaudi/scipy,chatcannon/scipy,matthew-brett/scipy,perimosocordiae/scipy,hainm/scipy,ortylp/scipy,raoulbq/scipy,sauliusl/scipy,vanpact/scipy,chatcannon/scipy,larsmans/scipy,pnedunuri/scipy,ogrisel/scipy,maciejkula/scipy,WarrenWeckesser/scipy,mtrbean/scipy,nvoron23/scipy,ales-erjavec/scipy,juliantaylor/scipy,Kamp9/scipy,jakevdp/scipy,vhaasteren/scipy,niknow/scipy,aman-iitj/scipy,Dapid/scipy,pschella/scipy,lukauskas/scipy,jamestwebber/scipy,vigna/scipy,teoliphant/scipy,ChanderG/scipy,argriffing/scipy,Srisai85/scipy,behzadnouri/scipy,niknow/scipy,mortonjt/scipy,Dapid/scipy,FRidh/scipy,aeklant/scipy,giorgiop/scipy,endolith/scipy,larsmans/scipy,vanpact/scipy,ChanderG/scipy,WarrenWeckesser/scipy,mikebenfield/scipy,mdhaber/scipy,haudren/scipy,grlee77/scipy,pyramania/scipy,gdooper/scipy,fernand/scipy,lhilt/scipy,newemailjdm/scipy,gdooper/scipy,gdooper/scipy,zxsted/scipy,lukauskas/scipy,Kamp9/scipy,jamestwebber/scipy,richardotis/scipy,tylerjereddy/scipy,chatcannon/scipy,befelix/scipy,mortada/scipy,pschella/scipy,petebachant/scipy,Gillu13/scipy,vberaudi/scipy,teoliphant/scipy,ilayn/scipy,cpaulik/scipy
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
#config.add_subpackage('cluster')
#config.add_subpackage('fftpack')
#config.add_subpackage('integrate')
#config.add_subpackage('interpolate')
#config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
#config.add_subpackage('linsolve')
#config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
#config.add_subpackage('sandbox')
#config.add_subpackage('signal')
#config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
#config.add_subpackage('ndimage')
#config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('linsolve')
config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
config.add_subpackage('sandbox')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
<commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
#config.add_subpackage('cluster')
#config.add_subpackage('fftpack')
#config.add_subpackage('integrate')
#config.add_subpackage('interpolate')
#config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
#config.add_subpackage('linsolve')
#config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
#config.add_subpackage('sandbox')
#config.add_subpackage('signal')
#config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
#config.add_subpackage('ndimage')
#config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
<commit_msg>Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.<commit_after>
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('linsolve')
config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
config.add_subpackage('sandbox')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
#config.add_subpackage('cluster')
#config.add_subpackage('fftpack')
#config.add_subpackage('integrate')
#config.add_subpackage('interpolate')
#config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
#config.add_subpackage('linsolve')
#config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
#config.add_subpackage('sandbox')
#config.add_subpackage('signal')
#config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
#config.add_subpackage('ndimage')
#config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('linsolve')
config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
config.add_subpackage('sandbox')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
<commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
#config.add_subpackage('cluster')
#config.add_subpackage('fftpack')
#config.add_subpackage('integrate')
#config.add_subpackage('interpolate')
#config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
#config.add_subpackage('linsolve')
#config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
#config.add_subpackage('sandbox')
#config.add_subpackage('signal')
#config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
#config.add_subpackage('ndimage')
#config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
<commit_msg>Fix problem with __all__ variable and update weave docs a bit. Update compiler_cxx too.<commit_after>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('linsolve')
config.add_subpackage('maxentropy')
config.add_subpackage('misc')
#config.add_subpackage('montecarlo')
config.add_subpackage('optimize')
config.add_subpackage('sandbox')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('weave')
config.make_svn_version_py() # installs __svn_version__.py
config.make_config_py()
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
|
a6526ada6991d689d5351643c67b57805be59f16
|
python_recipes/multiprocessing_keyboard_interrupt.py
|
python_recipes/multiprocessing_keyboard_interrupt.py
|
import signal
import time
import multiprocessing
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
import signal
import time
import multiprocessing
# See here for detail:
# https://noswap.com/blog/python-multiprocessing-keyboardinterrupt
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
Add the source of this solution
|
Add the source of this solution
|
Python
|
apache-2.0
|
wangshan/sketch,wangshan/sketch,wangshan/sketch,wangshan/sketch
|
import signal
import time
import multiprocessing
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
Add the source of this solution
|
import signal
import time
import multiprocessing
# See here for detail:
# https://noswap.com/blog/python-multiprocessing-keyboardinterrupt
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
<commit_before>import signal
import time
import multiprocessing
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
<commit_msg>Add the source of this solution<commit_after>
|
import signal
import time
import multiprocessing
# See here for detail:
# https://noswap.com/blog/python-multiprocessing-keyboardinterrupt
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
import signal
import time
import multiprocessing
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
Add the source of this solutionimport signal
import time
import multiprocessing
# See here for detail:
# https://noswap.com/blog/python-multiprocessing-keyboardinterrupt
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
<commit_before>import signal
import time
import multiprocessing
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
<commit_msg>Add the source of this solution<commit_after>import signal
import time
import multiprocessing
# See here for detail:
# https://noswap.com/blog/python-multiprocessing-keyboardinterrupt
def handle_KeyboardInterrupt():
signal.signal(signal.SIGINT, signal.SIG_IGN)
def doSomething(number):
time.sleep(1)
print "received {0}".format(number)
class Worker(object):
def __init__(self, poolSize):
self.pool = multiprocessing.Pool(poolSize, handle_KeyboardInterrupt)
def clean(self):
self.pool.close()
self.pool.join()
def work(self):
try:
self.pool.map_async(doSomething, range(8)).get(timeout=10)
except multiprocessing.TimeoutError as e:
print "Timeout"
except KeyboardInterrupt:
print "KeyboardInterrupt, user terminated the process"
self.pool.terminate()
self.pool.join()
print "Done"
if __name__ == '__main__':
worker = Worker(2)
worker.work()
worker.clean()
|
67ca9f09cd2cfb5e646b9a09b540c5ff88276201
|
pydirections/models/models.py
|
pydirections/models/models.py
|
from schematics.models import Model
from schematics.types import StringType
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
copyrights = StringType()
@property
def summary():
return summary
|
from schematics.models import Model
from schematics.types import StringType, DecimalType
from schematics.types.compound import ListType
class Distance(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Duration(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
steps = ListType(ModelType(Step))
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
legs = ListType(ModelType(Leg))
copyrights = StringType()
@property
def summary():
return summary
|
Add more details to routes
|
Add more details to routes
|
Python
|
apache-2.0
|
apranav19/pydirections
|
from schematics.models import Model
from schematics.types import StringType
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
copyrights = StringType()
@property
def summary():
return summaryAdd more details to routes
|
from schematics.models import Model
from schematics.types import StringType, DecimalType
from schematics.types.compound import ListType
class Distance(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Duration(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
steps = ListType(ModelType(Step))
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
legs = ListType(ModelType(Leg))
copyrights = StringType()
@property
def summary():
return summary
|
<commit_before>from schematics.models import Model
from schematics.types import StringType
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
copyrights = StringType()
@property
def summary():
return summary<commit_msg>Add more details to routes<commit_after>
|
from schematics.models import Model
from schematics.types import StringType, DecimalType
from schematics.types.compound import ListType
class Distance(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Duration(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
steps = ListType(ModelType(Step))
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
legs = ListType(ModelType(Leg))
copyrights = StringType()
@property
def summary():
return summary
|
from schematics.models import Model
from schematics.types import StringType
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
copyrights = StringType()
@property
def summary():
return summaryAdd more details to routesfrom schematics.models import Model
from schematics.types import StringType, DecimalType
from schematics.types.compound import ListType
class Distance(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Duration(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
steps = ListType(ModelType(Step))
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
legs = ListType(ModelType(Leg))
copyrights = StringType()
@property
def summary():
return summary
|
<commit_before>from schematics.models import Model
from schematics.types import StringType
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
copyrights = StringType()
@property
def summary():
return summary<commit_msg>Add more details to routes<commit_after>from schematics.models import Model
from schematics.types import StringType, DecimalType
from schematics.types.compound import ListType
class Distance(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Duration(Model):
"""
Represents the duration of a leg/step
"""
value = DecimalType()
text = StringType()
class Step(Model):
"""
Represents an individual step
"""
html_instructions = StringType()
class Leg(Model):
"""
Represents an individual leg
"""
start_address = StringType()
end_address = StringType()
steps = ListType(ModelType(Step))
class Route(Model):
"""
Represents an individual route whose attributes include
"""
summary = StringType(required=True)
legs = ListType(ModelType(Leg))
copyrights = StringType()
@property
def summary():
return summary
|
f32621c2c8ad207e152f10279e36f56970f48026
|
python/ecep/portal/widgets.py
|
python/ecep/portal/widgets.py
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, widget))
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60" class="%s">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, self.attrs.get('class', None), widget))
|
Set optional class on map widget if class attribute passed
|
Set optional class on map widget if class attribute passed
|
Python
|
mit
|
smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, widget))
Set optional class on map widget if class attribute passed
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60" class="%s">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, self.attrs.get('class', None), widget))
|
<commit_before>from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, widget))
<commit_msg>Set optional class on map widget if class attribute passed<commit_after>
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60" class="%s">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, self.attrs.get('class', None), widget))
|
from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, widget))
Set optional class on map widget if class attribute passedfrom django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60" class="%s">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, self.attrs.get('class', None), widget))
|
<commit_before>from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, widget))
<commit_msg>Set optional class on map widget if class attribute passed<commit_after>from django.forms import widgets
from django.utils.safestring import mark_safe
class MapWidget(widgets.HiddenInput):
"""Custom map widget for displaying interactive google map to geocode
addresses of learning centers.
This widget displays a readonly input box to store lat+lng data, an empty
help div, a map div for the google map, and a button to initiate geocoding.
"""
def render(self, name, value, attrs=None):
"""Overrides the render method. This controls the actual html output of a form
on the page
See widget docs for more information:
https://docs.djangoproject.com/en/1.4/ref/forms/widgets/
"""
widget = super(MapWidget, self).render(name, value, attrs)
return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="text" id="id_geom" size="60" class="%s">
<br>
<input type="button" value="Geocode Address" onclick=ecepAdmin.geocodeAddress()>
(<a onclick=ecepAdmin.mapHelp() href="#">?</a>)
<div id='map-help'></div><div id="map">%s</div>""" % (value, self.attrs.get('class', None), widget))
|
b26dc2f572fdd8f90a8241c3588870603d763d4d
|
examples/voice_list_webhook.py
|
examples/voice_list_webhook.py
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
if webhooks_list is None or webhooks_list.data is None:
print("\nNo webhooks\n")
exit(0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
Exit in voice webhook deletion example, if result is empty
|
Exit in voice webhook deletion example, if result is empty
|
Python
|
bsd-2-clause
|
messagebird/python-rest-api
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
Exit in voice webhook deletion example, if result is empty
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
if webhooks_list is None or webhooks_list.data is None:
print("\nNo webhooks\n")
exit(0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
<commit_before>#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
<commit_msg>Exit in voice webhook deletion example, if result is empty<commit_after>
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
if webhooks_list is None or webhooks_list.data is None:
print("\nNo webhooks\n")
exit(0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
Exit in voice webhook deletion example, if result is empty#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
if webhooks_list is None or webhooks_list.data is None:
print("\nNo webhooks\n")
exit(0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
<commit_before>#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
<commit_msg>Exit in voice webhook deletion example, if result is empty<commit_after>#!/usr/bin/env python
import argparse
import messagebird
from messagebird.voice_webhook import VoiceCreateWebhookRequest
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
args = vars(parser.parse_args())
try:
client = messagebird.Client(args['accessKey'])
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
if webhooks_list is None or webhooks_list.data is None:
print("\nNo webhooks\n")
exit(0)
# Print the object information.
print('\nThe following information was returned as a Voice Webhook objects:\n')
for webhook in webhooks_list.data:
print('{')
print(' id : %s' % webhook.id)
print(' token : %s' % webhook.token)
print(' url : %s' % webhook.url)
print(' createdAtDatetime : %s' % webhook.createdDatetime)
print(' updatedAtDatetime : %s' % webhook.updatedDatetime)
print('}\n')
except messagebird.client.ErrorException as e:
print('An error occured while reading a Voice Webhook object:')
for error in e.errors:
print(' code : %d' % error.code)
print(' description : %s' % error.description)
print(' parameter : %s\n' % error.parameter)
|
2c43a04e5027a5f8cc2739ea93ab24057a07838f
|
tests/common.py
|
tests/common.py
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import platform
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if platform.system() != "Darwin":
raise Exception("%s: This test suite must be run on OS X" % cls.__name__)
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines
|
Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines
|
Python
|
mit
|
cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer,cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import platform
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if platform.system() != "Darwin":
raise Exception("%s: This test suite must be run on OS X" % cls.__name__)
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
<commit_before>#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
<commit_msg>Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines<commit_after>
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import platform
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if platform.system() != "Darwin":
raise Exception("%s: This test suite must be run on OS X" % cls.__name__)
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import platform
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if platform.system() != "Darwin":
raise Exception("%s: This test suite must be run on OS X" % cls.__name__)
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
<commit_before>#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
<commit_msg>Raise an exception when DtraceTestCase (and subclasses) is used on non-darwin machines<commit_after>#!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import os
import unittest
import platform
import subprocess
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
class DtraceTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if platform.system() != "Darwin":
raise Exception("%s: This test suite must be run on OS X" % cls.__name__)
def setUp(self):
build_target(self._testMethodName)
def tearDown(self):
cleanup_target(self._testMethodName)
def current_target(self):
return TESTS_DIR + "/assets/" + self._testMethodName
def build_target(target):
# clang -arch x86_64 -o $target_name $target_name.c
output = executable_name_for_target(target)
source = sourcefile_name_for_target(target)
subprocess.check_call(["clang", "-arch", "x86_64", "-O0", "-o", output, source])
def cleanup_target(target):
os.remove(executable_name_for_target(target))
def sourcefile_name_for_target(target):
return "%s/assets/%s.c" % (TESTS_DIR, target)
def executable_name_for_target(target):
return "%s/assets/%s" % (TESTS_DIR, target)
|
2b63977524d8c00c7cecebf5f055488a447346f1
|
api.py
|
api.py
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
channel.send_message(user.user_id(), "hello")
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
Send a message back to client
|
Send a message back to client
|
Python
|
mit
|
misterwilliam/gae-channels-sample,misterwilliam/gae-channels-sample,misterwilliam/gae-channels-sample
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
Send a message back to client
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
channel.send_message(user.user_id(), "hello")
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
<commit_before>import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
<commit_msg>Send a message back to client<commit_after>
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
channel.send_message(user.user_id(), "hello")
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
Send a message back to clientimport webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
channel.send_message(user.user_id(), "hello")
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
<commit_before>import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
<commit_msg>Send a message back to client<commit_after>import webapp2
from google.appengine.api import channel
from google.appengine.api import users
class Channel(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if not user:
self.response.write({"token": ""})
return
token = channel.create_channel(user.user_id())
channel.send_message(user.user_id(), "hello")
self.response.write({"token": token})
app = webapp2.WSGIApplication([
('/api/channel', Channel),
])
|
315da880c81e02e8c576f51266dffaf19abf8e13
|
commen5/templatetags/commen5_tags.py
|
commen5/templatetags/commen5_tags.py
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
commen5 = register.tag(commen5)
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
@register.tag
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
|
Use the sexy, new decorator style syntax.
|
Use the sexy, new decorator style syntax.
|
Python
|
mit
|
bradmontgomery/django-commen5
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
commen5 = register.tag(commen5)
Use the sexy, new decorator style syntax.
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
@register.tag
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
|
<commit_before>from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
commen5 = register.tag(commen5)
<commit_msg>Use the sexy, new decorator style syntax.<commit_after>
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
@register.tag
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
|
from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
commen5 = register.tag(commen5)
Use the sexy, new decorator style syntax.from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
@register.tag
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
|
<commit_before>from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
commen5 = register.tag(commen5)
<commit_msg>Use the sexy, new decorator style syntax.<commit_after>from django import template
from django.template.defaulttags import CommentNode
register = template.Library()
@register.tag
def commen5(parser, token):
"""
Ignores everything between ``{% commen5 %}`` and ``{% endcommen5 %}``.
"""
parser.skip_past('endcommen5')
return CommentNode()
|
ad66203ccf2a76dde790c582e8915399fd4e3148
|
Code/Python/Kamaelia/Kamaelia/Visualisation/__init__.py
|
Code/Python/Kamaelia/Kamaelia/Visualisation/__init__.py
|
#!/usr/bin/env python
# Copyright (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General Public License, V2.1
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://kamaelia.sourceforge.net/AUTHORS - please extend this file,
# not this notice.
# (2) Reproduced in the COPYING file, and at:
# http://kamaelia.sourceforge.net/COPYING
# Under section 3.5 of the MPL, we are using this text since we deem the MPL
# notice inappropriate for this file. As per MPL/GPL/LGPL removal of this
# notice is prohibited.
#
# Please contact us via: kamaelia-list-owner@lists.sourceforge.net
# to discuss alternative licensing.
# -------------------------------------------------------------------------
import PhysicsGraph
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------
import PhysicsGraph
|
Change license to Apache 2
|
Change license to Apache 2
|
Python
|
apache-2.0
|
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
|
#!/usr/bin/env python
# Copyright (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General Public License, V2.1
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://kamaelia.sourceforge.net/AUTHORS - please extend this file,
# not this notice.
# (2) Reproduced in the COPYING file, and at:
# http://kamaelia.sourceforge.net/COPYING
# Under section 3.5 of the MPL, we are using this text since we deem the MPL
# notice inappropriate for this file. As per MPL/GPL/LGPL removal of this
# notice is prohibited.
#
# Please contact us via: kamaelia-list-owner@lists.sourceforge.net
# to discuss alternative licensing.
# -------------------------------------------------------------------------
import PhysicsGraph
Change license to Apache 2
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------
import PhysicsGraph
|
<commit_before>#!/usr/bin/env python
# Copyright (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General Public License, V2.1
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://kamaelia.sourceforge.net/AUTHORS - please extend this file,
# not this notice.
# (2) Reproduced in the COPYING file, and at:
# http://kamaelia.sourceforge.net/COPYING
# Under section 3.5 of the MPL, we are using this text since we deem the MPL
# notice inappropriate for this file. As per MPL/GPL/LGPL removal of this
# notice is prohibited.
#
# Please contact us via: kamaelia-list-owner@lists.sourceforge.net
# to discuss alternative licensing.
# -------------------------------------------------------------------------
import PhysicsGraph
<commit_msg>Change license to Apache 2<commit_after>
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------
import PhysicsGraph
|
#!/usr/bin/env python
# Copyright (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General Public License, V2.1
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://kamaelia.sourceforge.net/AUTHORS - please extend this file,
# not this notice.
# (2) Reproduced in the COPYING file, and at:
# http://kamaelia.sourceforge.net/COPYING
# Under section 3.5 of the MPL, we are using this text since we deem the MPL
# notice inappropriate for this file. As per MPL/GPL/LGPL removal of this
# notice is prohibited.
#
# Please contact us via: kamaelia-list-owner@lists.sourceforge.net
# to discuss alternative licensing.
# -------------------------------------------------------------------------
import PhysicsGraph
Change license to Apache 2#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------
import PhysicsGraph
|
<commit_before>#!/usr/bin/env python
# Copyright (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General Public License, V2.1
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://kamaelia.sourceforge.net/AUTHORS - please extend this file,
# not this notice.
# (2) Reproduced in the COPYING file, and at:
# http://kamaelia.sourceforge.net/COPYING
# Under section 3.5 of the MPL, we are using this text since we deem the MPL
# notice inappropriate for this file. As per MPL/GPL/LGPL removal of this
# notice is prohibited.
#
# Please contact us via: kamaelia-list-owner@lists.sourceforge.net
# to discuss alternative licensing.
# -------------------------------------------------------------------------
import PhysicsGraph
<commit_msg>Change license to Apache 2<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------
import PhysicsGraph
|
1e010e940390ae5b650224363e4acecd816b2611
|
settings_dev.py
|
settings_dev.py
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Settings.tmLanguage"
% PLUGIN_NAME)
TPL = "{\n\t$0\n}"
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax"
% PLUGIN_NAME)
TPL = '''\
{
"$1": $0
}'''.replace(" " * 4, "\t")
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
Update syntax path for new settings file command
|
Update syntax path for new settings file command
|
Python
|
mit
|
SublimeText/AAAPackageDev,SublimeText/AAAPackageDev,SublimeText/PackageDev
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Settings.tmLanguage"
% PLUGIN_NAME)
TPL = "{\n\t$0\n}"
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
Update syntax path for new settings file command
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax"
% PLUGIN_NAME)
TPL = '''\
{
"$1": $0
}'''.replace(" " * 4, "\t")
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
<commit_before>import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Settings.tmLanguage"
% PLUGIN_NAME)
TPL = "{\n\t$0\n}"
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
<commit_msg>Update syntax path for new settings file command<commit_after>
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax"
% PLUGIN_NAME)
TPL = '''\
{
"$1": $0
}'''.replace(" " * 4, "\t")
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Settings.tmLanguage"
% PLUGIN_NAME)
TPL = "{\n\t$0\n}"
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
Update syntax path for new settings file commandimport sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax"
% PLUGIN_NAME)
TPL = '''\
{
"$1": $0
}'''.replace(" " * 4, "\t")
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
<commit_before>import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Settings.tmLanguage"
% PLUGIN_NAME)
TPL = "{\n\t$0\n}"
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
<commit_msg>Update syntax path for new settings file command<commit_after>import sublime_plugin
from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
SETTINGS_SYNTAX = ("Packages/%s/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax"
% PLUGIN_NAME)
TPL = '''\
{
"$1": $0
}'''.replace(" " * 4, "\t")
class NewSettingsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.settings().set('default_dir', root_at_packages('User'))
v.set_syntax_file(SETTINGS_SYNTAX)
v.run_command('insert_snippet', {'contents': TPL})
|
cc1e5bc1ae3b91973d9fa30ab8e0f9cb3c147a9e
|
ddt.py
|
ddt.py
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
setattr(cls,
"{0}_{1}".format(name, v),
feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
test_name = getattr(v, "__name__", "{0}_{1}".format(name, v))
setattr(cls, test_name, feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
Use __name__ from data object to set the test method name, if available.
|
Use __name__ from data object to set the test method name, if available.
Allows to provide user-friendly names for the user instead of
the default raw data formatting.
|
Python
|
mit
|
domidimi/ddt,edx/ddt,domidimi/ddt,datadriventests/ddt,edx/ddt,datadriventests/ddt
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
setattr(cls,
"{0}_{1}".format(name, v),
feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
Use __name__ from data object to set the test method name, if available.
Allows to provide user-friendly names for the user instead of
the default raw data formatting.
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
test_name = getattr(v, "__name__", "{0}_{1}".format(name, v))
setattr(cls, test_name, feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
<commit_before>from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
setattr(cls,
"{0}_{1}".format(name, v),
feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
<commit_msg>Use __name__ from data object to set the test method name, if available.
Allows to provide user-friendly names for the user instead of
the default raw data formatting.<commit_after>
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
test_name = getattr(v, "__name__", "{0}_{1}".format(name, v))
setattr(cls, test_name, feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
setattr(cls,
"{0}_{1}".format(name, v),
feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
Use __name__ from data object to set the test method name, if available.
Allows to provide user-friendly names for the user instead of
the default raw data formatting.from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
test_name = getattr(v, "__name__", "{0}_{1}".format(name, v))
setattr(cls, test_name, feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
<commit_before>from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
setattr(cls,
"{0}_{1}".format(name, v),
feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
<commit_msg>Use __name__ from data object to set the test method name, if available.
Allows to provide user-friendly names for the user instead of
the default raw data formatting.<commit_after>from functools import wraps
__version__ = '0.1.1'
MAGIC = '%values' # this value cannot conflict with any real python attribute
def data(*values):
"""
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
"""
def wrapper(func):
setattr(func, MAGIC, values)
return func
return wrapper
def ddt(cls):
"""
Class decorator for subclasses of ``unittest.TestCase``.
Apply this decorator to the test case class, and then
decorate test methods with ``@data``.
For each method decorated with ``@data``, this will effectively create as
many methods as data items are passed as parameters to ``@data``.
"""
def feed_data(func, *args, **kwargs):
"""
This internal method decorator feeds the test data item to the test.
"""
@wraps(func)
def wrapper(self):
return func(self, *args, **kwargs)
return wrapper
for name, f in cls.__dict__.items():
if hasattr(f, MAGIC):
i = 0
for v in getattr(f, MAGIC):
test_name = getattr(v, "__name__", "{0}_{1}".format(name, v))
setattr(cls, test_name, feed_data(f, v))
i = i + 1
delattr(cls, name)
return cls
|
b419e78a42e7b8f073bc5d9502dffc97c5d627fb
|
apps/chats/forms.py
|
apps/chats/forms.py
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = ('text',)
model = Chat
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = (
'friend_groups',
'text',
)
model = Chat
|
Add friend_groups to the ChatForm
|
Add friend_groups to the ChatForm
|
Python
|
mit
|
tofumatt/quotes,tofumatt/quotes
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = ('text',)
model = Chat
Add friend_groups to the ChatForm
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = (
'friend_groups',
'text',
)
model = Chat
|
<commit_before>from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = ('text',)
model = Chat
<commit_msg>Add friend_groups to the ChatForm<commit_after>
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = (
'friend_groups',
'text',
)
model = Chat
|
from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = ('text',)
model = Chat
Add friend_groups to the ChatFormfrom django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = (
'friend_groups',
'text',
)
model = Chat
|
<commit_before>from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = ('text',)
model = Chat
<commit_msg>Add friend_groups to the ChatForm<commit_after>from django import forms
from django.contrib.auth.models import User
from chats.models import Chat
from profiles.models import FriendGroup
class PublicChatForm(forms.ModelForm):
"""Public-facing Chat form used in the web-interface for users."""
class Meta:
fields = (
'friend_groups',
'text',
)
model = Chat
|
db52a15b190db1d560959d5bc382b5aa8d7f5a57
|
mpld3/test_plots/test_axis.py
|
mpld3/test_plots/test_axis.py
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.yticks(positions)
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
Add test for custom tick locations, no labels
|
Add test for custom tick locations, no labels
|
Python
|
bsd-3-clause
|
kdheepak89/mpld3,kdheepak89/mpld3,aflaxman/mpld3,jakevdp/mpld3,mpld3/mpld3,e-koch/mpld3,jakevdp/mpld3,etgalloway/mpld3,mpld3/mpld3,aflaxman/mpld3,etgalloway/mpld3,e-koch/mpld3
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
Add test for custom tick locations, no labels
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.yticks(positions)
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
<commit_before>"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
<commit_msg>Add test for custom tick locations, no labels<commit_after>
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.yticks(positions)
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
Add test for custom tick locations, no labels"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.yticks(positions)
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
<commit_before>"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
<commit_msg>Add test for custom tick locations, no labels<commit_after>"""Plot to test ticker.FixedFormatter"""
import matplotlib.pyplot as plt
import numpy as np
import mpld3
def create_plot():
positions, labels = [0, 1, 10], ['A','B','C']
plt.yticks(positions)
plt.xticks(positions, labels)
return plt.gcf()
def test_axis():
fig = create_plot()
html = mpld3.fig_to_html(fig)
plt.close(fig)
if __name__ == "__main__":
mpld3.show(create_plot())
|
1a785ac4f272ff24c1dc94789699ab299ad782b9
|
alg_dijkstra_shortest_path.py
|
alg_dijkstra_shortest_path.py
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
vertex_distances_d = {
vertex: inf for vertex in weighted_graph_d
}
vertex_distances_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
shortest_path_d = {
vertex: inf for vertex in weighted_graph_d
}
shortest_path_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
Revise output vertex_distances_d to shortest_path_d
|
Revise output vertex_distances_d to shortest_path_d
|
Python
|
bsd-2-clause
|
bowen0701/algorithms_data_structures
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
vertex_distances_d = {
vertex: inf for vertex in weighted_graph_d
}
vertex_distances_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
Revise output vertex_distances_d to shortest_path_d
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
shortest_path_d = {
vertex: inf for vertex in weighted_graph_d
}
shortest_path_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
<commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
vertex_distances_d = {
vertex: inf for vertex in weighted_graph_d
}
vertex_distances_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
<commit_msg>Revise output vertex_distances_d to shortest_path_d<commit_after>
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
shortest_path_d = {
vertex: inf for vertex in weighted_graph_d
}
shortest_path_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
vertex_distances_d = {
vertex: inf for vertex in weighted_graph_d
}
vertex_distances_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
Revise output vertex_distances_d to shortest_path_dfrom __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
shortest_path_d = {
vertex: inf for vertex in weighted_graph_d
}
shortest_path_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
<commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
vertex_distances_d = {
vertex: inf for vertex in weighted_graph_d
}
vertex_distances_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
<commit_msg>Revise output vertex_distances_d to shortest_path_d<commit_after>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from ds_binary_heap_tuple import BinaryHeap
def dijkstra(weighted_graph_d, start_vertex):
inf = float('inf')
shortest_path_d = {
vertex: inf for vertex in weighted_graph_d
}
shortest_path_d[start_vertex] = 0
bh = BinaryHeap()
# TODO: Continue Dijkstra's algorithm.
def main():
weighted_graph_d = {
'u': {'v': 2, 'w': 5, 'x': 1},
'v': {'u': 2, 'w': 3, 'x': 2},
'w': {'u': 5, 'v': 3, 'x': 3, 'y': 1, 'z': 5},
'x': {'u': 1, 'v': 2, 'w': 3, 'y': 1},
'y': {'w': 1, 'x': 1, 'z': 1},
'z': {'w': 5, 'y': 1}
}
if __name__ == '__main__':
main()
|
f59f94cae98030172024013faccabaddc031b845
|
frontends/etiquette_flask/etiquette_flask/decorators.py
|
frontends/etiquette_flask/etiquette_flask/decorators.py
|
import flask
from flask import request
import functools
from etiquette import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
import flask
from flask import request
import functools
from . import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
Fix required_fields looking at wrong jsonify file.
|
Fix required_fields looking at wrong jsonify file.
|
Python
|
bsd-3-clause
|
voussoir/etiquette,voussoir/etiquette,voussoir/etiquette
|
import flask
from flask import request
import functools
from etiquette import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
Fix required_fields looking at wrong jsonify file.
|
import flask
from flask import request
import functools
from . import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
<commit_before>import flask
from flask import request
import functools
from etiquette import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
<commit_msg>Fix required_fields looking at wrong jsonify file.<commit_after>
|
import flask
from flask import request
import functools
from . import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
import flask
from flask import request
import functools
from etiquette import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
Fix required_fields looking at wrong jsonify file.import flask
from flask import request
import functools
from . import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
<commit_before>import flask
from flask import request
import functools
from etiquette import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
<commit_msg>Fix required_fields looking at wrong jsonify file.<commit_after>import flask
from flask import request
import functools
from . import jsonify
def required_fields(fields, forbid_whitespace=False):
'''
Declare that the endpoint requires certain POST body fields. Without them,
we respond with 400 and a message.
forbid_whitespace:
If True, then providing the field is not good enough. It must also
contain at least some non-whitespace characters.
'''
def wrapper(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
for requirement in fields:
missing = (
requirement not in request.form or
(forbid_whitespace and request.form[requirement].strip() == '')
)
if missing:
response = {
'error_type': 'MISSING_FIELDS',
'error_message': 'Required fields: %s' % ', '.join(fields),
}
response = jsonify.make_json_response(response, status=400)
return response
return function(*args, **kwargs)
return wrapped
return wrapper
|
2f860583a99b88324b19b1118b4aea29a28ae90d
|
polling_stations/apps/data_collection/management/commands/import_portsmouth.py
|
polling_stations/apps/data_collection/management/commands/import_portsmouth.py
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
elections = ["local.2018-05-03"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
if record.addressline6 == "PO1 5BZ":
return None
return super().address_record_to_dict(record)
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3270":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = (
"local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
)
stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
elections = ["local.2019-05-02"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
rec = super().address_record_to_dict(record)
if record.addressline6 == "PO4 099":
rec["postcode"] = "PO4 0PL"
if record.property_urn.strip().lstrip("0") in [
"1775122942",
"1775122943",
"1775122944",
]:
rec["postcode"] = "PO5 2BZ"
return rec
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3596":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
Add import script for Portsmouth
|
Add import script for Portsmouth
Closes #1502
|
Python
|
bsd-3-clause
|
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
elections = ["local.2018-05-03"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
if record.addressline6 == "PO1 5BZ":
return None
return super().address_record_to_dict(record)
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3270":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
Add import script for Portsmouth
Closes #1502
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = (
"local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
)
stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
elections = ["local.2019-05-02"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
rec = super().address_record_to_dict(record)
if record.addressline6 == "PO4 099":
rec["postcode"] = "PO4 0PL"
if record.property_urn.strip().lstrip("0") in [
"1775122942",
"1775122943",
"1775122944",
]:
rec["postcode"] = "PO5 2BZ"
return rec
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3596":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
<commit_before>from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
elections = ["local.2018-05-03"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
if record.addressline6 == "PO1 5BZ":
return None
return super().address_record_to_dict(record)
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3270":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
<commit_msg>Add import script for Portsmouth
Closes #1502<commit_after>
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = (
"local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
)
stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
elections = ["local.2019-05-02"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
rec = super().address_record_to_dict(record)
if record.addressline6 == "PO4 099":
rec["postcode"] = "PO4 0PL"
if record.property_urn.strip().lstrip("0") in [
"1775122942",
"1775122943",
"1775122944",
]:
rec["postcode"] = "PO5 2BZ"
return rec
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3596":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
elections = ["local.2018-05-03"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
if record.addressline6 == "PO1 5BZ":
return None
return super().address_record_to_dict(record)
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3270":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
Add import script for Portsmouth
Closes #1502from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = (
"local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
)
stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
elections = ["local.2019-05-02"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
rec = super().address_record_to_dict(record)
if record.addressline6 == "PO4 099":
rec["postcode"] = "PO4 0PL"
if record.property_urn.strip().lstrip("0") in [
"1775122942",
"1775122943",
"1775122944",
]:
rec["postcode"] = "PO5 2BZ"
return rec
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3596":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
<commit_before>from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv"
elections = ["local.2018-05-03"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
if record.addressline6 == "PO1 5BZ":
return None
return super().address_record_to_dict(record)
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3270":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
<commit_msg>Add import script for Portsmouth
Closes #1502<commit_after>from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E06000044"
addresses_name = (
"local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
)
stations_name = "local.2019-05-02/Version 1/Democracy_Club__02May2019Portsmouth.tsv"
elections = ["local.2019-05-02"]
csv_delimiter = "\t"
def address_record_to_dict(self, record):
rec = super().address_record_to_dict(record)
if record.addressline6 == "PO4 099":
rec["postcode"] = "PO4 0PL"
if record.property_urn.strip().lstrip("0") in [
"1775122942",
"1775122943",
"1775122944",
]:
rec["postcode"] = "PO5 2BZ"
return rec
def station_record_to_dict(self, record):
rec = super().station_record_to_dict(record)
if rec["internal_council_id"] == "3596":
rec["location"] = Point(-1.059545, 50.7866578, srid=4326)
return rec
|
61398045cb6bb5a0849fd203ebbe85bfa305ea60
|
favicon/templatetags/favtags.py
|
favicon/templatetags/favtags.py
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return '<!-- no favicon -->'
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return mark_safe('<!-- no favicon -->')
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
Mark comment as safe. Otherwise it is displayed.
|
Mark comment as safe. Otherwise it is displayed.
|
Python
|
mit
|
arteria/django-favicon-plus
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return '<!-- no favicon -->'
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
Mark comment as safe. Otherwise it is displayed.
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return mark_safe('<!-- no favicon -->')
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
<commit_before>from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return '<!-- no favicon -->'
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
<commit_msg>Mark comment as safe. Otherwise it is displayed.<commit_after>
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return mark_safe('<!-- no favicon -->')
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return '<!-- no favicon -->'
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
Mark comment as safe. Otherwise it is displayed.from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return mark_safe('<!-- no favicon -->')
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
<commit_before>from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return '<!-- no favicon -->'
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
<commit_msg>Mark comment as safe. Otherwise it is displayed.<commit_after>from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
"""
fav = Favicon.objects.filter(isFavicon=True).first()
if not fav:
return mark_safe('<!-- no favicon -->')
html = ''
for rel in config:
for size in sorted(config[rel], reverse=True):
n = fav.get_favicon(size=size, rel=rel)
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
n.rel, n.size, n.size, n.faviconImage.url)
default_fav = fav.get_favicon(size=32, rel='shortcut icon')
html += '<link rel="%s" sizes="%sx%s" href="%s"/>' % (
default_fav.rel, default_fav.size, default_fav.size, default_fav.faviconImage.url)
return mark_safe(html)
|
986b79024d4e40598d41bb363a09524a9e3f00fc
|
profile_xf11id/startup/00-startup.py
|
profile_xf11id/startup/00-startup.py
|
import logging
session_mgr._logger.setLevel(logging.CRITICAL)
from ophyd.userapi import *
|
import logging
session_mgr._logger.setLevel(logging.INFO)
from ophyd.userapi import *
|
Set logging level to be noisier, from CRITICAL to INFO.
|
ENH: Set logging level to be noisier, from CRITICAL to INFO.
|
Python
|
bsd-2-clause
|
NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd
|
import logging
session_mgr._logger.setLevel(logging.CRITICAL)
from ophyd.userapi import *
ENH: Set logging level to be noisier, from CRITICAL to INFO.
|
import logging
session_mgr._logger.setLevel(logging.INFO)
from ophyd.userapi import *
|
<commit_before>import logging
session_mgr._logger.setLevel(logging.CRITICAL)
from ophyd.userapi import *
<commit_msg>ENH: Set logging level to be noisier, from CRITICAL to INFO.<commit_after>
|
import logging
session_mgr._logger.setLevel(logging.INFO)
from ophyd.userapi import *
|
import logging
session_mgr._logger.setLevel(logging.CRITICAL)
from ophyd.userapi import *
ENH: Set logging level to be noisier, from CRITICAL to INFO.import logging
session_mgr._logger.setLevel(logging.INFO)
from ophyd.userapi import *
|
<commit_before>import logging
session_mgr._logger.setLevel(logging.CRITICAL)
from ophyd.userapi import *
<commit_msg>ENH: Set logging level to be noisier, from CRITICAL to INFO.<commit_after>import logging
session_mgr._logger.setLevel(logging.INFO)
from ophyd.userapi import *
|
708afd692f7c12a0a1564b688e0c83dd22709b09
|
mtglib/__init__.py
|
mtglib/__init__.py
|
__version__ = '1.3.3'
__author__ = 'Cameron Higby-Naquin'
|
__version__ = '1.4.0'
__author__ = 'Cameron Higby-Naquin'
|
Increment minor version for release.
|
Increment minor version for release.
|
Python
|
mit
|
chigby/mtg,chigby/mtg
|
__version__ = '1.3.3'
__author__ = 'Cameron Higby-Naquin'
Increment minor version for release.
|
__version__ = '1.4.0'
__author__ = 'Cameron Higby-Naquin'
|
<commit_before>__version__ = '1.3.3'
__author__ = 'Cameron Higby-Naquin'
<commit_msg>Increment minor version for release.<commit_after>
|
__version__ = '1.4.0'
__author__ = 'Cameron Higby-Naquin'
|
__version__ = '1.3.3'
__author__ = 'Cameron Higby-Naquin'
Increment minor version for release.__version__ = '1.4.0'
__author__ = 'Cameron Higby-Naquin'
|
<commit_before>__version__ = '1.3.3'
__author__ = 'Cameron Higby-Naquin'
<commit_msg>Increment minor version for release.<commit_after>__version__ = '1.4.0'
__author__ = 'Cameron Higby-Naquin'
|
b858b2640b8e509c1262644eda02afb05d90ff18
|
project/slacksync/management/commands/sync_slack_users.py
|
project/slacksync/management/commands/sync_slack_users.py
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync(autoremove)
tbd = sync.sync_members()
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync()
tbd = sync.sync_members(autoremove)
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
Fix autoremove in wrong place
|
Fix autoremove in wrong place
|
Python
|
mit
|
HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync(autoremove)
tbd = sync.sync_members()
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
Fix autoremove in wrong place
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync()
tbd = sync.sync_members(autoremove)
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
<commit_before># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync(autoremove)
tbd = sync.sync_members()
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
<commit_msg>Fix autoremove in wrong place<commit_after>
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync()
tbd = sync.sync_members(autoremove)
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync(autoremove)
tbd = sync.sync_members()
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
Fix autoremove in wrong place# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync()
tbd = sync.sync_members(autoremove)
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
<commit_before># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync(autoremove)
tbd = sync.sync_members()
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
<commit_msg>Fix autoremove in wrong place<commit_after># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slacksync.membersync import SlackMemberSync
from slacksync.utils import api_configured
class Command(BaseCommand):
help = 'Make sure all members are in Slack and optionally kick non-members'
def add_arguments(self, parser):
parser.add_argument('--autodeactivate', action='store_true', help='Automatically deactivate users that are no longer members')
pass
def handle(self, *args, **options):
if not api_configured():
raise CommandError("API not configured")
autoremove = False
if options['autodeactivate']:
autoremove = True
sync = SlackMemberSync()
tbd = sync.sync_members(autoremove)
if options['verbosity'] > 1:
for dm in tbd:
if autoremove:
print("User {uid} ({email}) was removed".format(uid=dm[0], email=dm[1]))
else:
print("User {uid} ({email}) should be removed".format(uid=dm[0], email=dm[1]))
|
7c13c15c3c1791a7ed545db562fb01e890658bdd
|
shared/management/__init__.py
|
shared/management/__init__.py
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
post_syncdb.connect(load_data)
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
# Update the index
print 'Generating Index'
management.call_command('index', 'all', flush=True, verbosity=1)
post_syncdb.connect(load_data)
|
Update syncdb to also regenerate the index.
|
Update syncdb to also regenerate the index.
|
Python
|
mit
|
Saevon/webdnd,Saevon/webdnd,Saevon/webdnd
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
post_syncdb.connect(load_data)
Update syncdb to also regenerate the index.
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
# Update the index
print 'Generating Index'
management.call_command('index', 'all', flush=True, verbosity=1)
post_syncdb.connect(load_data)
|
<commit_before>from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
post_syncdb.connect(load_data)
<commit_msg>Update syncdb to also regenerate the index.<commit_after>
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
# Update the index
print 'Generating Index'
management.call_command('index', 'all', flush=True, verbosity=1)
post_syncdb.connect(load_data)
|
from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
post_syncdb.connect(load_data)
Update syncdb to also regenerate the index.from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
# Update the index
print 'Generating Index'
management.call_command('index', 'all', flush=True, verbosity=1)
post_syncdb.connect(load_data)
|
<commit_before>from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
post_syncdb.connect(load_data)
<commit_msg>Update syncdb to also regenerate the index.<commit_after>from django.db.models.signals import post_syncdb
from django.conf import settings
from django.core import management
import os
import re
FIXTURE_RE = re.compile(r'^[^.]*.json$')
def load_data(sender, **kwargs):
"""
Loads fixture data after loading the last installed app
"""
if kwargs['app'].__name__ == settings.INSTALLED_APPS[-1] + ".models":
fixture_files = []
for loc in settings.INITIAL_FIXTURE_DIRS:
loc = os.path.abspath(loc)
if os.path.exists(loc):
fixture_files += os.listdir(loc)
fixture_files = filter(lambda v: FIXTURE_RE.match(v), fixture_files)
fixture_files = [os.path.join(loc, f) for f in fixture_files]
if len(fixture_files) > 0:
print "Initializing Fixtures:"
for fixture in fixture_files:
print " >> %s" % (fixture)
management.call_command('loaddata', fixture, verbosity=0)
# Update the index
print 'Generating Index'
management.call_command('index', 'all', flush=True, verbosity=1)
post_syncdb.connect(load_data)
|
a5d295b850cfad1d1f5655c96b4bb496b6b9e181
|
run.py
|
run.py
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
#os.environ['APP_SETTINGS'] = 'config.DebugProductionConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
Add line to easily uncomment and switch back and forth to production settings locally
|
Add line to easily uncomment and switch back and forth to production settings locally
|
Python
|
agpl-3.0
|
paulocheque/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
Add line to easily uncomment and switch back and forth to production settings locally
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
#os.environ['APP_SETTINGS'] = 'config.DebugProductionConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
<commit_before>#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
<commit_msg>Add line to easily uncomment and switch back and forth to production settings locally<commit_after>
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
#os.environ['APP_SETTINGS'] = 'config.DebugProductionConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
Add line to easily uncomment and switch back and forth to production settings locally#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
#os.environ['APP_SETTINGS'] = 'config.DebugProductionConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
<commit_before>#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
<commit_msg>Add line to easily uncomment and switch back and forth to production settings locally<commit_after>#!/usr/bin/env python
import os
os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig'
#os.environ['APP_SETTINGS'] = 'config.DebugProductionConfig'
from pskb_website import app
# Uncomment to see the config you're running with
#for key, value in app.config.iteritems():
#print key, value
app.run()
|
a3e78915cfacd6c7da667b563785521d5cd883a8
|
openmc/__init__.py
|
openmc/__init__.py
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.10.0'
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.11.0-dev'
|
Fix __version__ in Python API
|
Fix __version__ in Python API
|
Python
|
mit
|
amandalund/openmc,smharper/openmc,walshjon/openmc,shikhar413/openmc,paulromano/openmc,walshjon/openmc,mit-crpg/openmc,amandalund/openmc,amandalund/openmc,paulromano/openmc,amandalund/openmc,paulromano/openmc,shikhar413/openmc,smharper/openmc,mit-crpg/openmc,walshjon/openmc,liangjg/openmc,liangjg/openmc,smharper/openmc,paulromano/openmc,shikhar413/openmc,liangjg/openmc,mit-crpg/openmc,shikhar413/openmc,smharper/openmc,mit-crpg/openmc,walshjon/openmc,liangjg/openmc
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.10.0'
Fix __version__ in Python API
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.11.0-dev'
|
<commit_before>from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.10.0'
<commit_msg>Fix __version__ in Python API<commit_after>
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.11.0-dev'
|
from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.10.0'
Fix __version__ in Python APIfrom openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.11.0-dev'
|
<commit_before>from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.10.0'
<commit_msg>Fix __version__ in Python API<commit_after>from openmc.arithmetic import *
from openmc.cell import *
from openmc.checkvalue import *
from openmc.mesh import *
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *
from openmc.macroscopic import *
from openmc.material import *
from openmc.plots import *
from openmc.region import *
from openmc.volume import *
from openmc.source import *
from openmc.settings import *
from openmc.surface import *
from openmc.universe import *
from openmc.lattice import *
from openmc.filter import *
from openmc.filter_expansion import *
from openmc.trigger import *
from openmc.tally_derivative import *
from openmc.tallies import *
from openmc.mgxs_library import *
from openmc.executor import *
from openmc.statepoint import *
from openmc.summary import *
from openmc.particle_restart import *
from openmc.mixin import *
from openmc.plotter import *
from openmc.search import *
from openmc.polynomial import *
from . import examples
# Import a few convencience functions that used to be here
from openmc.model import rectangular_prism, hexagonal_prism
__version__ = '0.11.0-dev'
|
c5e265143540f29a3bb97e8413b1bb3cffbd35c4
|
push/utils.py
|
push/utils.py
|
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def _seed_from_word(word):
return sum(ord(c) for c in word)
def seeded_shuffle(seedword, list):
state = random.getstate()
seed = _seed_from_word(seedword)
random.seed(seed)
random.shuffle(list)
random.setstate(state)
|
import hashlib
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def seeded_shuffle(seedword, list):
list.sort(key=lambda h: hashlib.md5(seedword + h).hexdigest())
|
Make shuffle handle the host list size changing.
|
Make shuffle handle the host list size changing.
|
Python
|
bsd-3-clause
|
reddit/push
|
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def _seed_from_word(word):
return sum(ord(c) for c in word)
def seeded_shuffle(seedword, list):
state = random.getstate()
seed = _seed_from_word(seedword)
random.seed(seed)
random.shuffle(list)
random.setstate(state)
Make shuffle handle the host list size changing.
|
import hashlib
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def seeded_shuffle(seedword, list):
list.sort(key=lambda h: hashlib.md5(seedword + h).hexdigest())
|
<commit_before>import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def _seed_from_word(word):
return sum(ord(c) for c in word)
def seeded_shuffle(seedword, list):
state = random.getstate()
seed = _seed_from_word(seedword)
random.seed(seed)
random.shuffle(list)
random.setstate(state)
<commit_msg>Make shuffle handle the host list size changing.<commit_after>
|
import hashlib
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def seeded_shuffle(seedword, list):
list.sort(key=lambda h: hashlib.md5(seedword + h).hexdigest())
|
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def _seed_from_word(word):
return sum(ord(c) for c in word)
def seeded_shuffle(seedword, list):
state = random.getstate()
seed = _seed_from_word(seedword)
random.seed(seed)
random.shuffle(list)
random.setstate(state)
Make shuffle handle the host list size changing.import hashlib
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def seeded_shuffle(seedword, list):
list.sort(key=lambda h: hashlib.md5(seedword + h).hexdigest())
|
<commit_before>import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def _seed_from_word(word):
return sum(ord(c) for c in word)
def seeded_shuffle(seedword, list):
state = random.getstate()
seed = _seed_from_word(seedword)
random.seed(seed)
random.shuffle(list)
random.setstate(state)
<commit_msg>Make shuffle handle the host list size changing.<commit_after>import hashlib
import os
import random
def get_random_word(config):
file_size = os.path.getsize(config.paths.wordlist)
word = ""
with open(config.paths.wordlist, "r") as wordlist:
while not word.isalpha() or not word.islower() or len(word) < 5:
position = random.randint(1, file_size)
wordlist.seek(position)
wordlist.readline()
word = unicode(wordlist.readline().rstrip("\n"), 'utf-8')
return word
def seeded_shuffle(seedword, list):
list.sort(key=lambda h: hashlib.md5(seedword + h).hexdigest())
|
5f6e525f11b12de98dfadfc721176caa193541e3
|
slackclient/_slackrequest.py
|
slackclient/_slackrequest.py
|
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
return requests.post(
'https://{0}/api/{1}'.format(domain, request),
data=dict(post_data, token=token),
)
|
import json
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
for k, v in post_data.items():
if not isinstance(v, (str, unicode)):
post_data[k] = json.dumps(v)
url = 'https://{0}/api/{1}'.format(domain, request)
post_data['token'] = token
return requests.post(url, data=post_data)
|
Add support for nested structure, e.g. attachments.
|
Add support for nested structure, e.g. attachments.
> The optional attachments argument should contain a JSON-encoded array of
> attachments.
>
> https://api.slack.com/methods/chat.postMessage
This enables simpler calls like this:
sc.api_call('chat.postMessage', {'attachments': [{'title': 'hello'}]})
|
Python
|
mit
|
slackapi/python-slackclient,slackapi/python-slackclient,slackhq/python-slackclient,slackapi/python-slackclient
|
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
return requests.post(
'https://{0}/api/{1}'.format(domain, request),
data=dict(post_data, token=token),
)
Add support for nested structure, e.g. attachments.
> The optional attachments argument should contain a JSON-encoded array of
> attachments.
>
> https://api.slack.com/methods/chat.postMessage
This enables simpler calls like this:
sc.api_call('chat.postMessage', {'attachments': [{'title': 'hello'}]})
|
import json
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
for k, v in post_data.items():
if not isinstance(v, (str, unicode)):
post_data[k] = json.dumps(v)
url = 'https://{0}/api/{1}'.format(domain, request)
post_data['token'] = token
return requests.post(url, data=post_data)
|
<commit_before>import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
return requests.post(
'https://{0}/api/{1}'.format(domain, request),
data=dict(post_data, token=token),
)
<commit_msg>Add support for nested structure, e.g. attachments.
> The optional attachments argument should contain a JSON-encoded array of
> attachments.
>
> https://api.slack.com/methods/chat.postMessage
This enables simpler calls like this:
sc.api_call('chat.postMessage', {'attachments': [{'title': 'hello'}]})<commit_after>
|
import json
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
for k, v in post_data.items():
if not isinstance(v, (str, unicode)):
post_data[k] = json.dumps(v)
url = 'https://{0}/api/{1}'.format(domain, request)
post_data['token'] = token
return requests.post(url, data=post_data)
|
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
return requests.post(
'https://{0}/api/{1}'.format(domain, request),
data=dict(post_data, token=token),
)
Add support for nested structure, e.g. attachments.
> The optional attachments argument should contain a JSON-encoded array of
> attachments.
>
> https://api.slack.com/methods/chat.postMessage
This enables simpler calls like this:
sc.api_call('chat.postMessage', {'attachments': [{'title': 'hello'}]})import json
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
for k, v in post_data.items():
if not isinstance(v, (str, unicode)):
post_data[k] = json.dumps(v)
url = 'https://{0}/api/{1}'.format(domain, request)
post_data['token'] = token
return requests.post(url, data=post_data)
|
<commit_before>import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
return requests.post(
'https://{0}/api/{1}'.format(domain, request),
data=dict(post_data, token=token),
)
<commit_msg>Add support for nested structure, e.g. attachments.
> The optional attachments argument should contain a JSON-encoded array of
> attachments.
>
> https://api.slack.com/methods/chat.postMessage
This enables simpler calls like this:
sc.api_call('chat.postMessage', {'attachments': [{'title': 'hello'}]})<commit_after>import json
import requests
class SlackRequest(object):
@staticmethod
def do(token, request="?", post_data=None, domain="slack.com"):
post_data = post_data or {}
for k, v in post_data.items():
if not isinstance(v, (str, unicode)):
post_data[k] = json.dumps(v)
url = 'https://{0}/api/{1}'.format(domain, request)
post_data['token'] = token
return requests.post(url, data=post_data)
|
0d3737aa2d9ecc435bc110cb6c0045d815b57cad
|
pygelf/tls.py
|
pygelf/tls.py
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, cert=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
self.cert = cert
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
if self.cert is None:
wrapped_socket = ssl.wrap_socket(s)
else:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.cert, cert_reqs=ssl.CERT_REQUIRED)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.ca_certs, cert_reqs=self.reqs)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
Add parameter 'validate' to TLS handler
|
Add parameter 'validate' to TLS handler
|
Python
|
mit
|
keeprocking/pygelf,keeprocking/pygelf
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, cert=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
self.cert = cert
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
if self.cert is None:
wrapped_socket = ssl.wrap_socket(s)
else:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.cert, cert_reqs=ssl.CERT_REQUIRED)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
Add parameter 'validate' to TLS handler
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.ca_certs, cert_reqs=self.reqs)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
<commit_before>from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, cert=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
self.cert = cert
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
if self.cert is None:
wrapped_socket = ssl.wrap_socket(s)
else:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.cert, cert_reqs=ssl.CERT_REQUIRED)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
<commit_msg>Add parameter 'validate' to TLS handler<commit_after>
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.ca_certs, cert_reqs=self.reqs)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, cert=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
self.cert = cert
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
if self.cert is None:
wrapped_socket = ssl.wrap_socket(s)
else:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.cert, cert_reqs=ssl.CERT_REQUIRED)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
Add parameter 'validate' to TLS handlerfrom __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.ca_certs, cert_reqs=self.reqs)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
<commit_before>from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, cert=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
self.cert = cert
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
if self.cert is None:
wrapped_socket = ssl.wrap_socket(s)
else:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.cert, cert_reqs=ssl.CERT_REQUIRED)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
<commit_msg>Add parameter 'validate' to TLS handler<commit_after>from __future__ import print_function
from pygelf.tcp import GelfTcpHandler
import ssl
import socket
import sys
class GelfTlsHandler(GelfTcpHandler):
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
def makeSocket(self, timeout=1):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if hasattr(s, 'settimeout'):
s.settimeout(timeout)
try:
wrapped_socket = ssl.wrap_socket(s, ca_certs=self.ca_certs, cert_reqs=self.reqs)
wrapped_socket.connect((self.host, self.port))
return wrapped_socket
except Exception as e:
print('SSL socket exception:', e, file=sys.stderr)
|
70672da6b94ae0f272bd875e4aede28fab7aeb6f
|
pyluos/io/ws.py
|
pyluos/io/ws.py
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data)
def close(self):
self._ws.close()
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data + '\r'.encode())
def close(self):
self._ws.close()
|
Add \r at the end of Web socket
|
Add \r at the end of Web socket
|
Python
|
mit
|
pollen/pyrobus
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data)
def close(self):
self._ws.close()
Add \r at the end of Web socket
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data + '\r'.encode())
def close(self):
self._ws.close()
|
<commit_before>import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data)
def close(self):
self._ws.close()
<commit_msg>Add \r at the end of Web socket<commit_after>
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data + '\r'.encode())
def close(self):
self._ws.close()
|
import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data)
def close(self):
self._ws.close()
Add \r at the end of Web socketimport os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data + '\r'.encode())
def close(self):
self._ws.close()
|
<commit_before>import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data)
def close(self):
self._ws.close()
<commit_msg>Add \r at the end of Web socket<commit_after>import os
import socket
import websocket
from . import IOHandler
def resolve_hostname(hostname, port):
# We do our own mDNS resolution
# to enforce we only search for IPV4 address
# and avoid a 5s timeout in the websocket on the ESP
# See https://github.com/esp8266/Arduino/issues/2110
addrinfo = socket.getaddrinfo(hostname, port,
socket.AF_INET, 0,
socket.SOL_TCP)
addr = addrinfo[0][4][0]
return addr
class Ws(IOHandler):
@classmethod
def is_host_compatible(cls, host):
try:
socket.inet_pton(socket.AF_INET, host)
return True
except socket.error:
return host.endswith('.local')
@classmethod
def available_hosts(cls):
hosts = ['pi-gate.local']
return [
ip
for ip in hosts
if os.system('ping -c 1 -W1 -t1 {} > /dev/null 2>&1'.format(ip)) == 0
]
def __init__(self, host, port=9342):
host = resolve_hostname(host, port)
url = 'ws://{}:{}'.format(host, port)
self._ws = websocket.create_connection(url)
def is_ready(self):
return True
def recv(self):
return self._ws.recv()
def write(self, data):
self._ws.send(data + '\r'.encode())
def close(self):
self._ws.close()
|
ab2b3bda76a39e34c0d4a172d3ede7ed9e77b774
|
base/ajax.py
|
base/ajax.py
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.filter(userprofile__sites=request.site)\
.filter(is_active=True)\
.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
Add filters to message recipient autocomplete.
|
Add filters to message recipient autocomplete.
|
Python
|
bsd-3-clause
|
ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
Add filters to message recipient autocomplete.
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.filter(userprofile__sites=request.site)\
.filter(is_active=True)\
.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
<commit_before>import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
<commit_msg>Add filters to message recipient autocomplete.<commit_after>
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.filter(userprofile__sites=request.site)\
.filter(is_active=True)\
.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
Add filters to message recipient autocomplete.import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.filter(userprofile__sites=request.site)\
.filter(is_active=True)\
.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
<commit_before>import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
<commit_msg>Add filters to message recipient autocomplete.<commit_after>import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\
User.objects.filter(last_name__icontains=query)
qs = qs.filter(userprofile__sites=request.site)\
.filter(is_active=True)\
.exclude(id=request.user.id).exclude(id=-1)
result = [
{'username': u.username,
'label': '%s (%s)' % (u.get_full_name(), u.username)}
for u in qs.distinct()]
return json.dumps(result)
|
2da4a8113e9f35444a9b44d6b1717b38d9e88f82
|
parsl/data_provider/scheme.py
|
parsl/data_provider/scheme.py
|
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
def __init__(self, endpoint_uuid, endpoint_path=None, local_path=None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
import typeguard
from typing import Optional
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
@typeguard.typechecked
def __init__(self, endpoint_uuid: str, endpoint_path: Optional[str] = None, local_path: Optional[str] = None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
Add type annotations for globus
|
Add type annotations for globus
|
Python
|
apache-2.0
|
Parsl/parsl,Parsl/parsl,Parsl/parsl,Parsl/parsl
|
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
def __init__(self, endpoint_uuid, endpoint_path=None, local_path=None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
Add type annotations for globus
|
import typeguard
from typing import Optional
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
@typeguard.typechecked
def __init__(self, endpoint_uuid: str, endpoint_path: Optional[str] = None, local_path: Optional[str] = None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
<commit_before>from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
def __init__(self, endpoint_uuid, endpoint_path=None, local_path=None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
<commit_msg>Add type annotations for globus<commit_after>
|
import typeguard
from typing import Optional
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
@typeguard.typechecked
def __init__(self, endpoint_uuid: str, endpoint_path: Optional[str] = None, local_path: Optional[str] = None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
def __init__(self, endpoint_uuid, endpoint_path=None, local_path=None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
Add type annotations for globusimport typeguard
from typing import Optional
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
@typeguard.typechecked
def __init__(self, endpoint_uuid: str, endpoint_path: Optional[str] = None, local_path: Optional[str] = None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
<commit_before>from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
def __init__(self, endpoint_uuid, endpoint_path=None, local_path=None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
<commit_msg>Add type annotations for globus<commit_after>import typeguard
from typing import Optional
from parsl.utils import RepresentationMixin
class GlobusScheme(RepresentationMixin):
"""Specification for accessing data on a remote executor via Globus.
Parameters
----------
endpoint_uuid : str
Universally unique identifier of the Globus endpoint at which the data can be accessed.
This can be found in the `Manage Endpoints <https://www.globus.org/app/endpoints>`_ page.
endpoint_path : str, optional
FIXME
local_path : str, optional
FIXME
"""
@typeguard.typechecked
def __init__(self, endpoint_uuid: str, endpoint_path: Optional[str] = None, local_path: Optional[str] = None):
self.endpoint_uuid = endpoint_uuid
self.endpoint_path = endpoint_path
self.local_path = local_path
|
774fff656463eb44fb10813f8668e37ed2d459fc
|
ktbs_bench/utils/decorators.py
|
ktbs_bench/utils/decorators.py
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
@wraps(f)
def wrapped(*args, **kwargs):
timer = Timer(tick_now=False)
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
Fix timer in @bench to be reset for each benched function call
|
Fix timer in @bench to be reset for each benched function call
|
Python
|
mit
|
ktbs/ktbs-bench,ktbs/ktbs-bench
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
Fix timer in @bench to be reset for each benched function call
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
@wraps(f)
def wrapped(*args, **kwargs):
timer = Timer(tick_now=False)
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
<commit_before>from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
<commit_msg>Fix timer in @bench to be reset for each benched function call<commit_after>
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
@wraps(f)
def wrapped(*args, **kwargs):
timer = Timer(tick_now=False)
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
Fix timer in @bench to be reset for each benched function callfrom functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
@wraps(f)
def wrapped(*args, **kwargs):
timer = Timer(tick_now=False)
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
<commit_before>from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
<commit_msg>Fix timer in @bench to be reset for each benched function call<commit_after>from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
@wraps(f)
def wrapped(*args, **kwargs):
timer = Timer(tick_now=False)
timer.start()
f(*args, **kwargs)
timer.stop()
res = [call_signature(f, *args, **kwargs),
timer.get_times()['real']] # TODO penser a quel temps garder
return res
return wrapped
def call_signature(f, *args, **kwargs):
"""Return a string representation of a function call."""
call_args = getcallargs(f, *args, **kwargs)
return ';'.join(["%s=%s" % (k, v) for k, v in call_args.items()])
@bench
def lala(a, b, c="default c", d="default d"):
print("lala est appelee")
if __name__ == '__main__':
print(lala("cest a", "cest b", d="change d"))
|
582bb1f7a2de8756bcb72d79d61aab84c09ef503
|
beetle_sass/__init__.py
|
beetle_sass/__init__.py
|
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
|
from os import path
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def includer_handler(content, suggested_path):
content = render_sass(content.decode('utf-8'))
file_path, _ = path.splitext(suggested_path)
return '{}.css'.format(file_path), content.encode('utf-8')
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
context.includer.add(sass_extensions, includer_handler)
|
Add includer handler as well as content renderer
|
Add includer handler as well as content renderer
|
Python
|
mit
|
Tenzer/beetle-sass
|
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
Add includer handler as well as content renderer
|
from os import path
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def includer_handler(content, suggested_path):
content = render_sass(content.decode('utf-8'))
file_path, _ = path.splitext(suggested_path)
return '{}.css'.format(file_path), content.encode('utf-8')
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
context.includer.add(sass_extensions, includer_handler)
|
<commit_before>import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
<commit_msg>Add includer handler as well as content renderer<commit_after>
|
from os import path
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def includer_handler(content, suggested_path):
content = render_sass(content.decode('utf-8'))
file_path, _ = path.splitext(suggested_path)
return '{}.css'.format(file_path), content.encode('utf-8')
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
context.includer.add(sass_extensions, includer_handler)
|
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
Add includer handler as well as content rendererfrom os import path
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def includer_handler(content, suggested_path):
content = render_sass(content.decode('utf-8'))
file_path, _ = path.splitext(suggested_path)
return '{}.css'.format(file_path), content.encode('utf-8')
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
context.includer.add(sass_extensions, includer_handler)
|
<commit_before>import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
<commit_msg>Add includer handler as well as content renderer<commit_after>from os import path
import sass
def render_sass(raw_content):
return sass.compile(string=raw_content)
def includer_handler(content, suggested_path):
content = render_sass(content.decode('utf-8'))
file_path, _ = path.splitext(suggested_path)
return '{}.css'.format(file_path), content.encode('utf-8')
def register(context, plugin_config):
sass_extensions = ['sass', 'scss']
context.content_renderer.add_renderer(sass_extensions, render_sass)
context.includer.add(sass_extensions, includer_handler)
|
1d09a1c92f813af26abfea60846345b3757e356a
|
blog/views.py
|
blog/views.py
|
import os
from django.views.generic import TemplateView
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
return [os.path.join('blog', 'blog', article_name, 'index.html')]
|
import os
from django.views.generic import TemplateView
from django.template.base import TemplateDoesNotExist
from django.http import Http404
from django.template.loader import get_template
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
template = os.path.join('blog', 'blog', article_name, 'index.html')
try:
get_template(template)
except TemplateDoesNotExist:
raise Http404
return [template]
|
Make sure that missing blog pages don't 500
|
Make sure that missing blog pages don't 500
|
Python
|
mit
|
stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb
|
import os
from django.views.generic import TemplateView
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
return [os.path.join('blog', 'blog', article_name, 'index.html')]
Make sure that missing blog pages don't 500
|
import os
from django.views.generic import TemplateView
from django.template.base import TemplateDoesNotExist
from django.http import Http404
from django.template.loader import get_template
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
template = os.path.join('blog', 'blog', article_name, 'index.html')
try:
get_template(template)
except TemplateDoesNotExist:
raise Http404
return [template]
|
<commit_before>import os
from django.views.generic import TemplateView
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
return [os.path.join('blog', 'blog', article_name, 'index.html')]
<commit_msg>Make sure that missing blog pages don't 500<commit_after>
|
import os
from django.views.generic import TemplateView
from django.template.base import TemplateDoesNotExist
from django.http import Http404
from django.template.loader import get_template
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
template = os.path.join('blog', 'blog', article_name, 'index.html')
try:
get_template(template)
except TemplateDoesNotExist:
raise Http404
return [template]
|
import os
from django.views.generic import TemplateView
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
return [os.path.join('blog', 'blog', article_name, 'index.html')]
Make sure that missing blog pages don't 500import os
from django.views.generic import TemplateView
from django.template.base import TemplateDoesNotExist
from django.http import Http404
from django.template.loader import get_template
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
template = os.path.join('blog', 'blog', article_name, 'index.html')
try:
get_template(template)
except TemplateDoesNotExist:
raise Http404
return [template]
|
<commit_before>import os
from django.views.generic import TemplateView
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
return [os.path.join('blog', 'blog', article_name, 'index.html')]
<commit_msg>Make sure that missing blog pages don't 500<commit_after>import os
from django.views.generic import TemplateView
from django.template.base import TemplateDoesNotExist
from django.http import Http404
from django.template.loader import get_template
class ArticleView(TemplateView):
def get_template_names(self):
article_name = self.kwargs.get('article_name', 'notfound')
template = os.path.join('blog', 'blog', article_name, 'index.html')
try:
get_template(template)
except TemplateDoesNotExist:
raise Http404
return [template]
|
e34258c5c05bfeddfb25c4090c4a5f34376f597c
|
climatecontrol/__init__.py
|
climatecontrol/__init__.py
|
#!/usr/bin/env python
"""
CLIMATECONTROL controls your apps configuration environment. It is a Python
library for loading app configurations from files and/or namespaced environment
variables.
:licence: MIT, see LICENSE file for more details.
"""
from settings_parser import Settings # noqa: F401
|
Add Settings class to top level package namespace
|
Add Settings class to top level package namespace
|
Python
|
mit
|
daviskirk/climatecontrol
|
Add Settings class to top level package namespace
|
#!/usr/bin/env python
"""
CLIMATECONTROL controls your apps configuration environment. It is a Python
library for loading app configurations from files and/or namespaced environment
variables.
:licence: MIT, see LICENSE file for more details.
"""
from settings_parser import Settings # noqa: F401
|
<commit_before>
<commit_msg>Add Settings class to top level package namespace<commit_after>
|
#!/usr/bin/env python
"""
CLIMATECONTROL controls your apps configuration environment. It is a Python
library for loading app configurations from files and/or namespaced environment
variables.
:licence: MIT, see LICENSE file for more details.
"""
from settings_parser import Settings # noqa: F401
|
Add Settings class to top level package namespace#!/usr/bin/env python
"""
CLIMATECONTROL controls your apps configuration environment. It is a Python
library for loading app configurations from files and/or namespaced environment
variables.
:licence: MIT, see LICENSE file for more details.
"""
from settings_parser import Settings # noqa: F401
|
<commit_before>
<commit_msg>Add Settings class to top level package namespace<commit_after>#!/usr/bin/env python
"""
CLIMATECONTROL controls your apps configuration environment. It is a Python
library for loading app configurations from files and/or namespaced environment
variables.
:licence: MIT, see LICENSE file for more details.
"""
from settings_parser import Settings # noqa: F401
|
|
b8eb16ac78c081711236d73e5c099ed734f897ac
|
pyscriptic/refs.py
|
pyscriptic/refs.py
|
from pyscriptic.containers import CONTAINERS
from pyscriptic.storage import STORAGE_LOCATIONS
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
# XXX: Check container id?
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
from pyscriptic.containers import CONTAINERS, list_containers
from pyscriptic.storage import STORAGE_LOCATIONS
_AVAILABLE_CONTAINERS_IDS = None
def _available_container_ids():
"""
This helper function fetchs a list of all containers available to the
currently active organization. It then stores the container IDs so that we
can compare against them later when creating new References.
Returns
-------
set of str
"""
global _AVAILABLE_CONTAINERS_IDS
if _AVAILABLE_CONTAINERS_IDS is not None:
return _AVAILABLE_CONTAINERS_IDS
_AVAILABLE_CONTAINERS_IDS = set(i.container_id for i in list_containers())
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
if container_id is not None:
assert container_id in _available_container_ids()
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
Check container IDs when making new References
|
Check container IDs when making new References
|
Python
|
bsd-2-clause
|
naderm/pytranscriptic,naderm/pytranscriptic
|
from pyscriptic.containers import CONTAINERS
from pyscriptic.storage import STORAGE_LOCATIONS
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
# XXX: Check container id?
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
Check container IDs when making new References
|
from pyscriptic.containers import CONTAINERS, list_containers
from pyscriptic.storage import STORAGE_LOCATIONS
_AVAILABLE_CONTAINERS_IDS = None
def _available_container_ids():
"""
This helper function fetchs a list of all containers available to the
currently active organization. It then stores the container IDs so that we
can compare against them later when creating new References.
Returns
-------
set of str
"""
global _AVAILABLE_CONTAINERS_IDS
if _AVAILABLE_CONTAINERS_IDS is not None:
return _AVAILABLE_CONTAINERS_IDS
_AVAILABLE_CONTAINERS_IDS = set(i.container_id for i in list_containers())
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
if container_id is not None:
assert container_id in _available_container_ids()
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
<commit_before>
from pyscriptic.containers import CONTAINERS
from pyscriptic.storage import STORAGE_LOCATIONS
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
# XXX: Check container id?
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
<commit_msg>Check container IDs when making new References<commit_after>
|
from pyscriptic.containers import CONTAINERS, list_containers
from pyscriptic.storage import STORAGE_LOCATIONS
_AVAILABLE_CONTAINERS_IDS = None
def _available_container_ids():
"""
This helper function fetchs a list of all containers available to the
currently active organization. It then stores the container IDs so that we
can compare against them later when creating new References.
Returns
-------
set of str
"""
global _AVAILABLE_CONTAINERS_IDS
if _AVAILABLE_CONTAINERS_IDS is not None:
return _AVAILABLE_CONTAINERS_IDS
_AVAILABLE_CONTAINERS_IDS = set(i.container_id for i in list_containers())
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
if container_id is not None:
assert container_id in _available_container_ids()
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
from pyscriptic.containers import CONTAINERS
from pyscriptic.storage import STORAGE_LOCATIONS
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
# XXX: Check container id?
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
Check container IDs when making new References
from pyscriptic.containers import CONTAINERS, list_containers
from pyscriptic.storage import STORAGE_LOCATIONS
_AVAILABLE_CONTAINERS_IDS = None
def _available_container_ids():
"""
This helper function fetchs a list of all containers available to the
currently active organization. It then stores the container IDs so that we
can compare against them later when creating new References.
Returns
-------
set of str
"""
global _AVAILABLE_CONTAINERS_IDS
if _AVAILABLE_CONTAINERS_IDS is not None:
return _AVAILABLE_CONTAINERS_IDS
_AVAILABLE_CONTAINERS_IDS = set(i.container_id for i in list_containers())
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
if container_id is not None:
assert container_id in _available_container_ids()
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
<commit_before>
from pyscriptic.containers import CONTAINERS
from pyscriptic.storage import STORAGE_LOCATIONS
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
# XXX: Check container id?
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
<commit_msg>Check container IDs when making new References<commit_after>
from pyscriptic.containers import CONTAINERS, list_containers
from pyscriptic.storage import STORAGE_LOCATIONS
_AVAILABLE_CONTAINERS_IDS = None
def _available_container_ids():
"""
This helper function fetchs a list of all containers available to the
currently active organization. It then stores the container IDs so that we
can compare against them later when creating new References.
Returns
-------
set of str
"""
global _AVAILABLE_CONTAINERS_IDS
if _AVAILABLE_CONTAINERS_IDS is not None:
return _AVAILABLE_CONTAINERS_IDS
_AVAILABLE_CONTAINERS_IDS = set(i.container_id for i in list_containers())
class Reference(object):
"""
Contains the information to either create or link a given container to a
reference through a protocol via an intermediate name.
Attributes
----------
container_id : str
new : str
store : dict of str, str
discard bool
Notes
-----
.. [1] https://www.transcriptic.com/platform/#instr_access
"""
def __init__(self, container_id=None, new=None, store_where=None, discard=False):
assert (container_id is not None) != (new is not None)
assert (store_where is not None) != (discard)
assert store_where in STORAGE_LOCATIONS.keys() or store_where is None
assert new in CONTAINERS.keys() or new is None
if container_id is not None:
assert container_id in _available_container_ids()
self.container_id = container_id
self.new = new
self.store = {"where": store_where}
self.discard = discard
|
393d06be7c5056985d16c039b8181fc05f40f9e0
|
ci/testsettings.py
|
ci/testsettings.py
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
HAYSTACK_TEST_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# secret key added as a travis build step
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
# must be defined for initial setup
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# for unit tests, that swap test connection in for default
HAYSTACK_TEST_CONNECTIONS = HAYSTACK_CONNECTIONS
# secret key added as a travis build step
|
Tweak travis-ci settings for haystack setup and test
|
Tweak travis-ci settings for haystack setup and test
|
Python
|
apache-2.0
|
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
HAYSTACK_TEST_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# secret key added as a travis build step
Tweak travis-ci settings for haystack setup and test
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
# must be defined for initial setup
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# for unit tests, that swap test connection in for default
HAYSTACK_TEST_CONNECTIONS = HAYSTACK_CONNECTIONS
# secret key added as a travis build step
|
<commit_before># This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
HAYSTACK_TEST_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# secret key added as a travis build step
<commit_msg>Tweak travis-ci settings for haystack setup and test<commit_after>
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
# must be defined for initial setup
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# for unit tests, that swap test connection in for default
HAYSTACK_TEST_CONNECTIONS = HAYSTACK_CONNECTIONS
# secret key added as a travis build step
|
# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
HAYSTACK_TEST_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# secret key added as a travis build step
Tweak travis-ci settings for haystack setup and test# This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
# must be defined for initial setup
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# for unit tests, that swap test connection in for default
HAYSTACK_TEST_CONNECTIONS = HAYSTACK_CONNECTIONS
# secret key added as a travis build step
|
<commit_before># This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
HAYSTACK_TEST_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# secret key added as a travis build step
<commit_msg>Tweak travis-ci settings for haystack setup and test<commit_after># This file is exec'd from settings.py, so it has access to and can
# modify all the variables in settings.py.
# If this file is changed in development, the development server will
# have to be manually restarted because changes will not be noticed
# immediately.
DEBUG = False
# include database settings to use Mariadb ver on production (5.5)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test',
'USER': 'root',
'HOST': 'localhost',
'PORT': '',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
},
},
}
# must be defined for initial setup
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/test-derrida',
'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores',
}
}
# for unit tests, that swap test connection in for default
HAYSTACK_TEST_CONNECTIONS = HAYSTACK_CONNECTIONS
# secret key added as a travis build step
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.