Skip to content

Instantly share code, notes, and snippets.

data_factory.patch_case = function (case_id, diff) {
/* PATCH case resource.
*/
if(typeof(case_id) === 'undefined') {
throw 'Rrequired parameters missing:*case_id*';
}
return $http({
method: 'PATCH',
headers: {'Content-Type': 'application/json; charset=utf-8'},
url: url_base + 'case/' + case_id,
data_factory.patch_case($scope.case_id, $scope.diff)
.success(function(data, status, headers, config) {
toaster.pop('success', "case resource", "successfully updated");
$scope.diff = {};
$scope.diff_ready = false;
})
.error(data_factory.handle_error);
<!-- file: test_detail.html
if murkup placed in this file all works fine.
-->
<div ng-controller="TestDetailEvaluationCtrl">
<h3>Evaluation #{{eval_id}}</h3>
<table ng-table="tbl_eval" class="table table-bordered">
<tr ng-repeat="slice in tbl_data_eval" ng-class="{'success': slice.passed == true, 'danger': slice.passed == false}">
<td title="Name" sortable="name">{{slice.name}}</td>
<td title="Passed" sortable="passed">{{slice.passed}}</td>
<td title="msg">{{slice.msg}}</td>
var a = {'msg': 'Error msg'};
var b = {'msg': {'msg': 'data avail'}};
c = var.msg.msg (if exists) else var.msg
>>> a_local = 555
>>> locals()['a_local']
555
>>> locals()['a_local'] = 666
>>> locals()['a_local']
666
import numpy as np
>>> np.__version__
'1.6.1'
>>> errno_distr = # getter function call here
>>> type(errno_distr)
<type 'numpy.ndarray'>
>>> errno_distr
array([[ 0. , 39597. , 99.99242424],
[ 104. , 1. , 0.00252525],
$ git log -n 1
commit 62575c309d155f024b3ad07cbedec0db4715492d
Author: Alexey Lavrenuke (load testing) <direvius@yandex-team.ru>
Date: Mon Aug 26 20:34:56 2013 +0400
except KeyboardInterrupt
(trash)dhcp4-55-ben:Tests gkomissarov$ ./run_nosetest.sh
test_run (Tests.ABTest.ABTestCase) ... ok
test_run (Tests.AggregatorTest.AggregatorPluginTestCase) ... ok
test_run_final_read (Tests.AggregatorTest.AggregatorPluginTestCase) ... ok
import StringIO
import pandas as pd
import numpy as np
csv = """"epoach","tags","rtt"
1377001421.090,case1;case2,113189
1377001421.287, ,91509
1377001421.487,case1,101581
1377001421.688,case1,90653
import pprint
pp = pprint.PrettyPrinter(indent=4).pprint
import StringIO
import pandas as pd
import numpy as np
csv = """"epoach","tags","rtt"
1377001421.090,case1;case2,113189
1377001421.287, ,91509
>>> import numpy as np
>>> standart_perc = [50, 75, 80, 85, 90, 95, 98, 99, 100]
>>> a = np.arange(110)
>>> np.percentile(a, standart_perc)
[54.5, 81.75, 87.200000000000003, 92.649999999999991, 98.100000000000009, 103.55, 106.81999999999999, 107.91, 109.0]
# How to calc percentage of values between 54.5 and 81.75, 81.75 and 87.200000000000003, etc .. ?