Skip to content

Instantly share code, notes, and snippets.

View 57uff3r's full-sized avatar
🎯
Focusing

Andrey Korchak 57uff3r

🎯
Focusing
View GitHub Profile
@57uff3r
57uff3r / Makefile
Created December 24, 2018 07:39 — forked from playpauseandstop/Makefile
Setup aiohttp web app with Session Middleware to use Redis Storage and run under Gunicorn.
.PHONY: clean distclean install run
ENV ?= env
VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));")
ifeq ($(VENV),1)
GUNICORN = gunicorn
else
GUNICORN = $(ENV)/bin/gunicorn
endif

Assignment: Центральная предельная теорема своими руками

В этом задании вам предстоит проверить работу центральной предельной теоремы, а также поработать с генерацией случайных чисел и построением графиков в Питоне.

  1. Выберите ваше любимое непрерывное распределение (чем меньше оно будет похоже на нормальное, тем интереснее; попробуйте выбрать какое-нибудь распределение из тех, что мы не обсуждали в курсе).
  • Прочитать, что такое непрерывное распределение, выбрать то, которое нравится больше всех.
  • Кратко описать его в своём ноутбуке (определение + формулы + график + почему нравится).
  1. Сгенерируйте из него выборку объёма 1000, постройте гистограмму выборки и нарисуйте поверх неё теоретическую плотность распределения вашей случайной величи
@57uff3r
57uff3r / README
Last active August 29, 2015 14:26
netflix-prize
SUMMARY
================================================================================
This dataset was constructed to support participants in the Netflix Prize. See
http://www.netflixprize.com for details about the prize.
The movie rating files contain over 100 million ratings from 480 thousand
randomly-chosen, anonymous Netflix customers over 17 thousand movie titles. The
data were collected between October, 1998 and December, 2005 and reflect the
distribution of all ratings received during this period. The ratings are on a
import xml.sax
import xml.sax.handler
import re
class BodyNotFound(Exception):
pass
class BookHandler(xml.sax.handler.ContentHandler):
def __init__(self):
self.inBody = False
@57uff3r
57uff3r / dijsktra.py
Last active September 20, 2018 02:26
Modified Python implementation of Dijkstra's Algorithm (https://gist.github.com/econchick/4666413)
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
return self
def add_node(self, value):
self.nodes.add(value)
return self
@57uff3r
57uff3r / iphone.sh
Created August 19, 2014 06:31
Terminal alias for iPhone simulator (os x only)
alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
@57uff3r
57uff3r / promt.sh
Created June 20, 2014 04:38
Install cool colorful command line promt
# install cool colorful command line promt
export PS1="\[$(tput bold)\]\[$(tput setaf 4)\][\[$(tput setaf 2)\]\u\[$(tput setaf 2)\]@\h \[$(tput setaf 1)\]\`pwd\`\[$(tput setaf 4)\]]\\$ \[$(tput sgr0)\]"
@57uff3r
57uff3r / rabbitmq-monitoring.sh
Created June 20, 2014 04:36
Rabbit MQ queues monitoring
#
# Rabbit MQ queues monitoring
#
watch 'rabbitmqctl list_queues name messages_unacknowledged messages_ready messages durable auto_delete consumers| grep -v "\.\.\." | sort | column -t;'

Keybase proof

I hereby claim:

  • I am 57uff3r on github.
  • I am 57uff3r (https://keybase.io/57uff3r) on keybase.
  • I have a public key whose fingerprint is 7B32 67F6 D548 AA2B 063B 98C1 168D 7AD1 608E BC11

To claim this, I am signing this object: