This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(MASS) | |
svm_error <- function() { | |
# 1) generate a random training sample to train on + fit | |
# build training set | |
x0 = mvrnorm(50,rep(0,10),diag(10)) | |
x1 = mvrnorm(50,rep(c(1,0),c(5,5)),diag(10)) | |
train = rbind(x0,x1) | |
classes = rep(c(0,1),c(50,50)) | |
dat=data.frame(train,classes=as.factor(classes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/quark/tests/test_db_api.py | |
+++ b/quark/tests/test_db_api.py | |
@@ -19,6 +19,7 @@ from neutron.db import api as neutron_db_api | |
from oslo.config import cfg | |
from quark.db import api as db_api | |
+from quark.db import models | |
from quark.tests import test_base | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.venv)amir@devbox:~/rackerlabs/quark$ git diff v615.44..v615.47 --stat --oneline | |
quark/api/extensions/ports_quark.py | 4 ++++ | |
quark/gunicorn_server.py | 34 +++++++++++++++++----------------- | |
quark/plugin_modules/networks.py | 7 ++----- | |
quark/plugin_modules/subnets.py | 11 ++++------- | |
quark/plugin_views.py | 24 ++++++++++++++---------- | |
5 files changed, 41 insertions(+), 39 deletions(-) | |
(.venv)amir@devbox:~/rackerlabs/quark$ git diff v615.44..v615.46 --stat --oneline | |
quark/api/extensions/ports_quark.py | 4 ++++ | |
quark/gunicorn_server.py | 34 +++++++++++++++++----------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> cells | |
{'a': (1, 10), 'b': (10, 20)} | |
>>> for c in cells: | |
... for i in range(cells[c][0], cells[c][1]): | |
... print 'ord-' + c + str(i) | |
... | |
ord-a1 | |
ord-a2 | |
ord-a3 | |
ord-a4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite> select s.id, ips.used_by_tenant_id from quark_ip_addresses ips join quark_subnets s on s.id = ips.subnet_id where ips._deallocated != 1 and ips.used_by_tenant_id in (123); | |
sqlite> select s.id, ips.used_by_tenant_id from quark_ip_addresses ips join quark_subnets s on s.id = ips.subnet_id where ips._deallocated != 1 and ips.used_by_tenant_id = (123); | |
id|used_by_tenant_id | |
1|123 | |
1|123 | |
sqlite> | |
amir@devbox:~/rackerlabs/quark/quark/tests/functional$ sqlite3 --version | |
3.8.5 2014-06-04 14:06:34 b1ed4f2a34ba66c29b130f8d13e9092758019212 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailNotifier(object): | |
def __init__(self): | |
self.smtp_server = config.CFG.get("email_notifier", "smtp_server") | |
self.smtp_port = config.CFG.getint("email_notifier", "smtp_port") | |
self.sender = config.CFG.get("email_notifier", "username") | |
self.password = config.CFG.get("email_notifier", "password") | |
def notify(self, recipients, subject, body=""): | |
session = smtplib.SMTP(self.smtp_server, self.smtp_port) | |
session.ehlo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": [ | |
{ | |
"id": "n0", | |
"label": "Bevmo", | |
"x": 0, | |
"y": 0, | |
"size": 3 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
$ python simulation.py ./simulation.log | |
mean 168604.207778 | |
min 85959.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.venv)amir@devbox:~/rackerlabs/inova/supernova$ pip freeze | |
Babel==1.3 | |
argparse==1.2.1 | |
cliff==1.9.0 | |
cmd2==0.6.8 | |
iso8601==0.1.10 | |
keyring==4.0 | |
netaddr==0.7.12 | |
netifaces==0.10.4 | |
os-diskconfig-python-novaclient-ext==0.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using library Wire in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire | |
Using library SPI in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI | |
Using library Adafruit Unified Sensor in folder: /Users/amir/Documents/Arduino/libraries/Adafruit_Unified_Sensor | |
Using library Adafruit LSM9DS0 Library in folder: /Users/amir/Documents/Arduino/libraries/Adafruit_LSM9DS0_Library | |
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega32u4 -DF_CPU=8000000L -DARDUINO=10605 -DARDUINO_AVR_FLORA8 -DARDUINO_ARCH_AVR -DUSB_VID=0x239A -DUSB_PID=0x8004 -DUSB_MANUFACTURER="Adafruit" -DUSB_PRODUCT="Flora" -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/amir/Library/Arduino15/packages/adafruit/hardware/avr/1.3.3/variants/flora -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire - |
OlderNewer