Skip to content

Instantly share code, notes, and snippets.

Avatar

Gonzalo Ruiz de Villa gonzaloruizdevilla

  • GFT
  • Madrid, Spain
View GitHub Profile
View hour.csv
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
@gonzaloruizdevilla
gonzaloruizdevilla / fibletter
Created Jun 5, 2020
Fibonacci secuence as letters
View fibletter
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``)}
View ViewController.swift
/*
* 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 Apr 2, 2020
swift_library/BUILD
View 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',
View 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/**"])
)
View 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"])
)
View WORKSPACE.bzl
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(
View iris14.py
print("Test set score (knn.score): {:.2f}".format(knn.score(X_test, y_test)))
View iris13.py
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)))
View iris12.py
prediction = knn.predict(X_new)
print("Prediction: {}".format(prediction))
print("Predicted target name: {}".format(iris_dataset['target_names'][prediction]))
You can’t perform that action at this time.