This file contains 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
(server-start) | |
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jun 15 14:00:29 2012 | |
Author: Josef Perktold | |
License: MIT, BSD-3 (for statsmodels) | |
http://en.wikipedia.org/wiki/Distance_correlation | |
Yaroslav and Satrajit on sklearn mailing list |
This file contains 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
/* | |
Name: Oceans16 Dark (modified to light) | |
Author: Kyle Dunovan (http://github.com/dunovank) | |
*/ | |
a {font-family: 'Helvetica', sans-serif; } | |
div#notebook, div.CodeMirror, div.output_area pre, div.output_wrapper, div.prompt, div.CodeMirror pre {font-family:'Fira Code', monospace; font-size: 11pt;} | |
/* Hiding the ipython log */ |
This file contains 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
# https://ru.wikibooks.org/wiki/Реализации_алгоритмов/Расстояние_Левенштейна#Python | |
def distance(a, b): | |
"Calculates the Levenshtein distance between a and b." | |
n, m = len(a), len(b) | |
if n > m: | |
# Make sure n <= m, to use O(min(n,m)) space | |
a, b = b, a | |
n, m = m, n | |
current_row = range(n+1) # Keep current and previous row, not entire matrix |
This file contains 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
--1. Задачи на операции с одной таблицей (без джойнов и подзапросов): | |
--a) В каких категориях имеется несколько товаров от одного и того же поставщика? | |
SELECT CategoryID | |
FROM Products | |
GROUP BY CategoryID, SupplierID | |
HAVING Count(ProductID) > 1; | |
--b) Сколько было куплено штук товара, принесшего компании максимальную выручку? | |
SELECT TOP 1 sum(Quantity) sumQuantity |
NewerOlder