- Random variable distribution.
- Normal distribution.
This file contains hidden or 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
import re | |
strings = """every day at 11:30 | |
every 2nd week tuesday at 11:30 | |
every 5 mins | |
""" | |
grammer = { | |
"G": "every <DAY_CTX> | <WEEK_CTX> | <MIN_CTX>", | |
"WEEK_CTX": "<WEEK> week <DAY_CTX>", |
This file contains hidden or 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 -*- | |
# pipes.py - Command-piping syntax for generators/coroutines in Python. | |
""" | |
pipes.py - Command-piping syntax for generators/coroutines in Python. | |
Example: | |
>>> from pipes import * | |
>>> chain1 = counter(5) | adder(2) |
This file contains hidden or 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
elasticsearch_master: | |
image: elasticsearch:latest | |
command: "elasticsearch -Des.cluster.name=workagram -Des.node.master=true -Des.node.data=false" | |
environment: | |
- ES_JAVA_OPTS="-Xms512m -Xmx512m" | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
elasticsearch1: |
This file contains hidden or 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
"""scrape amazon laptop and desktop prices""" | |
import os | |
import queue | |
import asyncio | |
import warnings | |
import peewee as db | |
from multiprocessing.managers import SyncManager | |
from multiprocessing import Process, RLock | |
from data import data |
This file contains hidden or 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
import queue | |
from multiprocessing.managers import SyncManager | |
from multiprocessing import Process, RLock | |
from bs4 import BeautifulSoup | |
from urllib import request | |
from urllib.parse import urlparse, urljoin | |
from multiprocessing.managers import MakeProxyType | |
BaseSetProxy = MakeProxyType('BaseSetProxy', ('__and__', '__contains__', '__iand__', '__ior__', | |
'__isub__', '__ixor__', '__len__', '__or__', '__rand__', '__ror__', '__rsub__', |
This file contains hidden or 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
{"posts": {"children": [1, 2,3, 4], "new": {"hello": "world"}}} |
This file contains hidden or 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
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy import stats | |
def hypothesis(x, theta): | |
"""function""" | |
return x.dot(theta).sum() | |
def compute_cost(X, Y, theta): | |
"""errors""" |
This file contains hidden or 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
import requests | |
from multiprocessing import Queue, Process, Pool | |
from peewee import * | |
db = SqliteDatabase('github.db') | |
class Github(Model): | |
name = CharField(unique=True) | |
no_repos = IntegerField() | |
no_follower = IntegerField() |
https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/ https://www.syncano.io/blog/configuring-running-django-celery-docker-containers-pt-1/ https://www.compose.com/articles/using-json-extensions-in-postgresql-from-python-2/ http://capside.com/labs/deploying-full-django-stack-with-docker-compose/