Skip to content

Instantly share code, notes, and snippets.

View gonzaloruizdevilla's full-sized avatar

Gonzalo Ruiz de Villa gonzaloruizdevilla

  • GFT
  • Madrid, Spain
View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
instant,dteday,season,yr,mnth,hr,holiday,weekday,workingday,weathersit,temp,atemp,hum,windspeed,casual,registered,cnt
1,2011-01-01,1,0,1,0,0,6,0,1,0.24,0.2879,0.81,0,3,13,16
2,2011-01-01,1,0,1,1,0,6,0,1,0.22,0.2727,0.8,0,8,32,40
3,2011-01-01,1,0,1,2,0,6,0,1,0.22,0.2727,0.8,0,5,27,32
4,2011-01-01,1,0,1,3,0,6,0,1,0.24,0.2879,0.75,0,3,10,13
5,2011-01-01,1,0,1,4,0,6,0,1,0.24,0.2879,0.75,0,0,1,1
6,2011-01-01,1,0,1,5,0,6,0,2,0.24,0.2576,0.75,0.0896,0,1,1
7,2011-01-01,1,0,1,6,0,6,0,1,0.22,0.2727,0.8,0,2,0,2
8,2011-01-01,1,0,1,7,0,6,0,1,0.2,0.2576,0.86,0,1,2,3
9,2011-01-01,1,0,1,8,0,6,0,1,0.24,0.2879,0.75,0,1,7,8
@gonzaloruizdevilla
gonzaloruizdevilla / fibletter
Created June 5, 2020 08:27
Fibonacci secuence as letters
function* fibletter() {
let a = 0;
let b = 1;
while(true) {
yield String.fromCharCode(97 + ((b-1)%26));
[a,b] = [b,b+a]
}
}
gen = fibletter(); for(let a = 1; a < 10; a++) {console.log(Array(6).fill(1).map(v => gen.next().value).join``)}
/*
* Copyright 2017 Google Inc. All rights reserved.
*
*
* 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
@gonzaloruizdevilla
gonzaloruizdevilla / BUILD
Created April 2, 2020 11:12
swift_library/BUILD
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
swift_library(
name = "PlacesLib",
srcs = glob(["places-address-form/**/*.swift"]),
deps = [
'@GooglePlaces//:GooglePlaces',
'@GoogleMaps//:GoogleMaps',
@gonzaloruizdevilla
gonzaloruizdevilla / GooglePlaces_BUILD.bzl
Created April 2, 2020 11:09
GooglePlaces/BUILD.bzl
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import")
apple_static_framework_import(
name = "GooglePlaces",
framework_imports = glob(["Frameworks/GooglePlaces.framework/**"])
)
@gonzaloruizdevilla
gonzaloruizdevilla / GoogleMaps_BUILD.bzl
Last active April 2, 2020 11:05
GoogleMaps/BUILD.bzl
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import")
apple_static_framework_import(
name = "GoogleMapsCore",
framework_imports = glob(
["Maps/Frameworks/GoogleMapsCore.framework/**"],
exclude=["Maps/Frameworks/GoogleMapsCore.framework/Modules/module.modulemap"])
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "GoogleMaps",
url = "https://dl.google.com/dl/cpdc/6102410a0f276cba/GoogleMaps-3.8.0.tar.gz",
sha256 = "137d20d5d7b9ec8d132dad02fdcc4ffa929493bb1de5e31cb5bb5e9b69e8bf9e",
build_file = "@//:GoogleMaps/BUILD"
)
http_archive(
async function maybeInstantiateStreaming(path, ...opts) {
// Start the download asap.
const f = fetch(path);
try {
// This will throw either if `instantiateStreaming` is
// undefined or the `Content-Type` header is wrong.
return WebAssembly.instantiateStreaming(
f,
...opts
);
print("Test set score (knn.score): {:.2f}".format(knn.score(X_test, y_test)))
y_pred = knn.predict(X_test)
print("Test set predictions:\n {}".format(y_pred))
print("Test set score (np.mean): {:.2f}".format(np.mean(y_pred == y_test)))