I hereby claim:
- I am citadelgrad on github.
- I am citadelgrad (https://keybase.io/citadelgrad) on keybase.
- I have a public key ASBvQ9sOB-mYtz8g05XGM63UM0jDxKxhwPB2uy6OpRGykwo
To claim this, I am signing this object:
from math import factorial | |
import numpy as np | |
def choose(n, k): | |
''' 25 choose 5 ''' | |
x = factorial(n) / (factorial(k)*(factorial(n-k))) | |
return x | |
def solve(): | |
# Monthly Price, Annual Price |
""" HTML | |
<form action="." method="POST"> | |
{% csrf_token %} | |
{{ form.as_p }} | |
{{ formset.as_p }} | |
<input type="submit" value="Create/Update Template"> | |
</form> | |
""" | |
""" views.py """ |
version: "2" | |
services: | |
db: | |
image: postgres | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
- ./backup:/backup | |
ports: | |
- "8001:5432" |
FROM python:2.7.11 | |
RUN apt-get update && apt-get install -y libmemcached-dev | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt |
I hereby claim:
To claim this, I am signing this object:
from functools import lru_cache | |
@lru_cache(1000) | |
def fibonacci(n): | |
if n == 0: | |
return 0 | |
elif n == 1: | |
return 1 | |
return fibonacci(n - 1) + fibonacci(n - 2) |
def get_coins(cents, coins): | |
if cents < 1: | |
return 0 | |
num_coins = 0 | |
for coin in coins: | |
num_coins += int(cents / coin) | |
cents = cents % coin | |
if cents == 0: | |
break | |
return num_coins |
#!/bin/bash | |
python -W error:"":RuntimeWarning:django.db.models.fields:0 manage.py runserver |
""" | |
Push items onto the Stack so that we can compare them as we process our string. | |
If the stack is not empty the element encapsulation is invalid. | |
""" | |
element = '[[{}]()]' | |
stack = list() | |
def matched_set(a, b): |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm