Skip to content

Instantly share code, notes, and snippets.

View hurrycane's full-sized avatar
🌗

Bogdan Gaza hurrycane

🌗
View GitHub Profile
@hurrycane
hurrycane / README.md
Created June 26, 2017 02:19 — forked from genomics-geek/README.md
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
# Prerequisities:
# 1. Install docker: https://docs.docker.com/engine/installation/
# 2. Install nvidia-docker: https://github.com/NVIDIA/nvidia-docker
# 3. set $NOTEBOOKS to the persistent local path of your notebooks
sudo nvidia-docker run -d \
--name "tensorflow-jupyter" \
--restart=unless-stopped \
-v $NOTEBOOKS:/notebooks \
-p 6006:6006 -p 8888:8888 \
sudo nvidia-docker run --rm tensorflow/tensorflow:0.10.0-gpu python -c 'import tensorflow as tf ; print tf.__version__'

What questions would you put on a phone screen for a distributed systems position?

These come from @tsantero with the last two additions being curteousy of @ifesdjeen in reply to this question from @SeanTAllen.

  1. explain the life of an http request.
  2. what does the FLP result teach us?
  3. what is a byzantine failure?
  4. explain CRDTs
  5. explain linearizability.
  6. how does DNS work?
### Keybase proof
I hereby claim:
* I am hurrycane on github.
* I am hurrycane (https://keybase.io/hurrycane) on keybase.
* I have a public key whose fingerprint is D011 A978 E301 0100 3FC1 3735 4573 140D 5838 F236
To claim this, I am signing this object:
FROM phusion/baseimage:0.9.11
ENV HOME /root
# custom keys
ADD private.pub /tmp/service
RUN mkdir -p /root/.ssh
RUN chmod 700 /root/.ssh
./../src/tests/cgroups_tests.cpp:297: Failure
cgroups::mount(TEST_CGROUPS_HIERARCHY, "cpu,memory", 10): 'cpu' is already attached to another hierarchy
[ FAILED ] CgroupsNoHierarchyTest.ROOT_CGROUPS_NOHIERARCHY_MountUnmountHierarchy (1003 ms)
pip install twitter.pants --allow-external elementtree --allow-unverified elementtree
# cat resources/user/api.py
from finny.views import ModelResource
from vvv.boot import db
from resources.user.model import User
class UsersView(ModelResource):
route_base = "users"
model = User
LoadPlugin threshold
LoadPlugin exec
<Plugin exec>
NotificationExec "nobody:nogroup" "/usr/lib/collectd/exec/handle_notification"
</Plugin>
<Plugin threshold>
<Host "tools.presslabs.net">
<Plugin "memory">