Skip to content

Instantly share code, notes, and snippets.

@devishot
devishot / california_housing_train__basic_statistics.txt
Created February 13, 2025 08:06
Google Machine Learning Crash Course: Numerical data
longitude latitude housing_median_age total_rooms total_bedrooms population households median_income median_house_value
count 17000.0 17000.0 17000.0 17000.0 17000.0 17000.0 17000.0 17000.0 17000.0
mean -119.6 35.6 28.6 2643.7 539.4 1429.6 501.2 3.9 207300.9
std 2.0 2.1 12.6 2179.9 421.5 1147.9 384.5 1.9 115983.8
min -124.3 32.5 1.0 2.0 1.0 3.0 1.0 0.5 14999.0
25% -121.8 33.9 18.0 1462.0 297.0 790.0 282.0 2.6 119400.0
50% -118.5 34.2 29.0 2127.0 434.0 1167.0 409.0 3.5 180400.0
75% -118.0 37.7 37.0 3151.2 648.2 1721.0 605.2 4.8 265000.0
max -114.3 42.0 52.0 37937.0 6445.0 35682.0 6082.0 15.0 500001.0
@devishot
devishot / binary_classification_rice.ipynb
Created February 9, 2025 08:51
Google Machine Learning Crash Course - Programming exercise: Binary Classification
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@devishot
devishot / google_course_ML_concepts_linear_regression_taxi.ipynb
Created February 6, 2025 07:52
Google Machine Learning Crash Course: Linear regression > taxi fare model training exercise
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@devishot
devishot / create_react_app__babel_relay.js
Last active November 25, 2018 18:21
Fix for new version of "babel-preset-react-app": "^6.1.0". Original script was taken from https://hackernoon.com/using-create-react-app-with-relay-modern-989c078fa892
const fs = require('fs');
const path = require('path');
const file = path.resolve('./node_modules/babel-preset-react-app/create.js');
var text = fs.readFileSync(file, 'utf8');
if (!text.includes('babel-plugin-relay')) {
if (text.includes("require('babel-plugin-macros'),")) {
text = text.replace(
"require('babel-plugin-macros'),",
@devishot
devishot / log15_gelf_handler.go
Last active December 7, 2017 09:51
Gelf with log15 UPD: use go-gelf.v2 by Graylog2
package gelflog15
import (
"os"
"strconv"
"strings"
"gopkg.in/inconshreveable/log15.v2"
"gopkg.in/Graylog2/go-gelf.v2/gelf"
)
@devishot
devishot / Program.cs
Created December 15, 2016 20:41
Synergy + AD + Exchange APIs mix
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Exchange.WebServices.Data;
using System.Net;
using System.Web;
using System.Net.Security;
@devishot
devishot / ios_mvvm_pop.playground
Created December 9, 2016 10:12
iOS MVVM with POP
//: Playground - noun: a place where people can play
import UIKit
protocol PaginatedDataStateProtocol {
var items: [NSObject] { get set }
var page: Int { get set }
var isFetching: Bool { get set }
@devishot
devishot / react_ideas
Created April 30, 2015 10:40
React Ideas: 1. common Form with custom buttons via React's childs; 2. get inside functions of Component as specials functions in props that Component should call them on didMount
__________________________________________________________
onAccept(value) {
to do smth with value
}
this.getValue = answerFunc
(
<ApplicationForm data={_data} handler={[['text', handler]]} getMeYourGetValueFunc={saveGetValueFunc}>
<Buttons>
@devishot
devishot / bashrc
Last active August 29, 2015 14:02
~/.bashrc hacks to Git-branch and pretty console. Preview: http://s1.postimg.org/5s2i1arsv/new_bashrc.png From cool-stuff of Mail.ru: http://habrahabr.ru/company/mailru/blog/145008/
# setup color variables
color_is_on=
color_red=
color_green=
color_yellow=
color_blue=
color_white=
color_gray=
color_bg_red=
color_off=
# Русский перевод для https://github.com/plataformatec/devise/tree/v3.2.4
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись подтверждена."
send_instructions: "В течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашей учётной записи."
send_paranoid_instructions: "Если Ваш адрес email есть в нашей базе данных, то в течение нескольких минут Вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure: