Skip to content

Instantly share code, notes, and snippets.

View genomics-geek's full-sized avatar

Michael Gonzalez genomics-geek

View GitHub Profile
@genomics-geek
genomics-geek / base.txt
Created October 12, 2016 15:14
Python Django requirments
# Django
django
# Configuration
dj-database-url
python-decouple
whitenoise
# Django 3rd party modules
djangorestframework
# virtual environments
venv
# Python files
*.pyc
__pycache__
# Python Notebook dot files
.ipynb*
@genomics-geek
genomics-geek / redux_egghead_notes.md
Created October 26, 2016 01:29 — forked from diegoconcha/redux_egghead_notes.md
Redux Egghead.io Notes

###Redux Egghead Video Notes###

####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree

@genomics-geek
genomics-geek / middleware.py
Created October 27, 2016 18:06 — forked from strogonoff/middleware.py
Django middleware for cross-domain XHR. WARNING: Defaults are unsafe here. Make sure to set proper restrictions in production!
from django import http
try:
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS
XS_SHARING_ALLOWED_HEADERS = settings.XS_SHARING_ALLOWED_HEADERS
XS_SHARING_ALLOWED_CREDENTIALS = settings.XS_SHARING_ALLOWED_CREDENTIALS
except AttributeError:
XS_SHARING_ALLOWED_ORIGINS = '*'
@genomics-geek
genomics-geek / README.md
Created October 31, 2016 01:51 — forked from jmarceli/README.md
React errors explained

1

You will get one of these:

Uncaught (in promise) TypeError: Cannot read property 'toUpperCase' of undefined(…)

ReactCompositeComponent.js:870 Uncaught TypeError: Cannot read property 'displayName' of undefined

if you try to:

@genomics-geek
genomics-geek / README.md
Last active December 11, 2016 03:15
Setup Apache Spark on MacOSX
@genomics-geek
genomics-geek / answer.md
Created December 13, 2016 03:06 — forked from non/answer.md
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@genomics-geek
genomics-geek / foo.md
Created January 12, 2017 14:02 — forked from rmoff/foo.md
cx_Oracle install on MacOS
  1. Download Instant Client:
  • instantclient-basic-macos.x64-11.2.0.4.0.zip
  • instantclient-sdk-macos.x64-11.2.0.4.0.zip
  • instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
  1. Unzip and move to /opt

  2. Create symlink

def set_up_dag_run(context, dag_run_obj):
dag_run_obj.payload = {"config": context["config"]}
dag_run_obj.run_id = str(uuid4())
print context
return dag_run_obj
def launch_workflow_command(args):
config_location = args.config_location
analysis_id = args.analysis_id