Skip to content

Instantly share code, notes, and snippets.

package main
import (
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
"flag"
package main
import (
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
"flag"
package main
import (
"time"
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
package main
import (
"time"
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
package main
import (
"time"
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
package main
import (
"time"
"errors"
"fmt"
"encoding/json"
"os"
"io"
"io/ioutil"
Benchmark Name Control Experiment Diff
url_resolve_flat_i18n_off 0.3297305942 0.3139383197 0.0157922745 (4.79% faster)
url_resolve_flat 0.2257557392 0.2225337029 0.0032220364 (1.43% faster)
query_prefetch_related 0.1121714115 0.1101288915 0.0020425200 (1.82% faster)
query_raw_deferred 0.0196125627 0.0187830687 0.0008294940 (4.23% faster)
query_all 0.0254666448 0.0250570416 0.0004096031 (1.61% faster)
query_select_related 0.0614788055 0.0613797784 0.0000990272 (0.16% faster)
query_get 0.0278315425 0.0277870297 0.0000445127 (0.16% faster)
query_get_or_create 0.0013747573 0.0013419986 0.0000327587 (2.38% faster)
from terminal:
rails new penceme
brew install imagemagick
1) User model
- email
- username
def get_field(self, field_name, **kwargs):
"""
Returns a field instance given a field name. By default will only search in forward
fields. By setting the include_related flag, the search is also extended to reverse
relations.
"""
if not apps.ready:
warnings.warn(
"The Apps registry is still not ready, this means get_field() is not able "
"to find related objects that point to this model.",
[11:02am] PirosB3: Hi all, question of the day: if I have a array of [x,y,timestamp] vectors, taken every 1-2 seconds, can I calculate it’s path (or the function that passes through every point) ?
[11:02am] PirosB3: I was thinking of something like PCA + some function fitting algorithm
[11:03am] PirosB3: anyone have any suggestions? thanks
[11:03am] duschendestroyer: when you want a function that passes through every point, that is called interpolation
[11:03am] duschendestroyer: https://docs.scipy.org/doc/scipy-0.14.0/reference/tutorial/interpolate.html
[11:04am] PirosB3: oh great, thanks
[11:04am] PirosB3: if I have some noise in the x,y vectors
[11:04am] PirosB3: do you think PCA is any good to remove it?
[11:04am] duschendestroyer: algorithms in scikit-learn do regression, which does fit a function which has specific characteristics but doesn't necessary pass through every point
[11:05am] PirosB3: duschendestroyer: I don’t want to necessarily use this for prediction