Benchmark Name | Control | Experiment | Diff |
---|---|---|---|
url_resolve_flat_i18n_off | 0.3300260305 | 0.3059779525 | 0.0240480781 (7.29% faster) |
query_prefetch_related | 0.0989829183 | 0.0927800298 | 0.0062028885 (6.27% faster) |
query_select_related | 0.0537939668 | 0.0502726555 | 0.0035213113 (6.55% faster) |
query_raw | 0.0156183600 | 0.0146648049 | 0.0009535551 (6.11% faster) |
l10n_render | 0.0068216324 | 0.0066468954 | 0.0001747370 (2.56% faster) |
query_raw_deferred | 0.0157507062 | 0.0155839086 | 0.0001667976 (1.06% faster) |
query_exists | 0.0012296319 | 0.0011273146 | 0.0001023173 (8.32% faster) |
query_count | 0.0003048658 | 0.0002639174 | 0.0000409484 (13.43% faster) |
This file contains hidden or 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
diff --git a/docs/ref/models/meta.txt b/docs/ref/models/meta.txt | |
index d728714..5ca1eae 100644 | |
--- a/docs/ref/models/meta.txt | |
+++ b/docs/ref/models/meta.txt | |
@@ -165,7 +165,12 @@ These old APIs can be replicated by either: | |
``_with_model`` variants) the properties of the desired fields. | |
Assuming you have a model named ``MyModel``, the following substitutions | |
-can be made to convert your code to the new API: | |
+can be made to convert your code to the new API. |
This file contains hidden or 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
package main | |
import "fmt" | |
type Result struct { | |
Class string | |
Score float64 | |
} | |
type ResultSet []*Result |
This file contains hidden or 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
from collections import defaultdict | |
import glob | |
import json | |
import unittest | |
import numpy as np | |
class Station(object): | |
def __init__(self, name, latitude, longitude): |
This file contains hidden or 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
import json | |
import re | |
from collections import defaultdict | |
FIRST_NUMBER = re.compile('\s\d') | |
def main(file, type_name): | |
connections = defaultdict(list) | |
with open(file) as f: | |
for line in f.readlines(): |
This file contains hidden or 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
use std::collections::HashMap; | |
use std::num::Float; | |
struct KNNClassifier<'a> { | |
data: &'a [[f64, ..4]], | |
targets: &'a [int], | |
} | |
impl<'a> KNNClassifier<'a> { |
This file contains hidden or 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
use std::io; | |
use std::io::BufferedReader; | |
use std::collections::HashMap; | |
use std::io::File; | |
use std::rand::{task_rng, Rng}; | |
struct MarkovModels<'a> { | |
data: HashMap<(&'a str, &'a str), Vec<&'a str>>, | |
words: &'a [&'a str] | |
} |
This file contains hidden or 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
use std::io::BufferedReader; | |
use std::collections::HashMap; | |
use std::io::File; | |
use std::rand::{task_rng, Rng}; | |
struct MarkovModels<'a> { | |
data: HashMap<(&'a str, &'a str), Vec<&'a str>>, | |
words: &'a Vec<&'a str> | |
} |
This file contains hidden or 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
def smoSimple(dataIn, classLabels, C, tolerance, maxIter): | |
dataMatrix = mat(dataIn) | |
labelMat = mat(classLabels).T | |
m, n = shape(dataMatrix) | |
alphas = mat(zeros((m,1))) | |
bias = 0 | |
iter = 0 | |
while (iter < maxIter): |
This file contains hidden or 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
copy(to_visit)) |